AbdulHadi806 commited on
Commit
5ff1d6b
·
verified ·
1 Parent(s): 2596f81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
- from transformers import T5ForConditionalGeneration, RobertaTokenizer
3
  import torch
4
 
5
  # Load the quantized model and tokenizer from Hugging Face Hub
6
  quantized_model = T5ForConditionalGeneration.from_pretrained("AbdulHadi806/codeT5-finetuned-LaTexToPythonCode-30kDataset")
7
- tokenizer = RobertaTokenizer.from_pretrained("AbdulHadi806/codeT5-finetuned-LaTexToPythonCode-30kDataset")
8
 
9
  def preprocess_infer_input(text):
10
  # Assuming the input is already a string, we don't need to access it as a dictionary
 
1
  import gradio as gr
2
+ from transformers import T5ForConditionalGeneration, AutoTokenizer
3
  import torch
4
 
5
  # Load the quantized model and tokenizer from Hugging Face Hub
6
  quantized_model = T5ForConditionalGeneration.from_pretrained("AbdulHadi806/codeT5-finetuned-LaTexToPythonCode-30kDataset")
7
+ tokenizer = AutoTokenizer.from_pretrained("AbdulHadi806/codeT5-finetuned-LaTexToPythonCode-30kDataset")
8
 
9
  def preprocess_infer_input(text):
10
  # Assuming the input is already a string, we don't need to access it as a dictionary