Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from transformers import T5ForConditionalGeneration,
|
| 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 =
|
| 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
|