Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
import streamlit as st
|
2 |
import torch
|
3 |
-
from transformers import
|
4 |
import re
|
5 |
import ast
|
6 |
|
7 |
# Load the fine-tuned model and tokenizer
|
8 |
model_repo_path = 'sabssag/Latex_to_Python_CodeT5-base'
|
9 |
-
model =
|
10 |
-
tokenizer =
|
11 |
model.eval()
|
12 |
|
13 |
# Fix unmatched brackets
|
|
|
1 |
import streamlit as st
|
2 |
import torch
|
3 |
+
from transformers import T5ForConditionalGeneration, RobertaTokenizer
|
4 |
import re
|
5 |
import ast
|
6 |
|
7 |
# Load the fine-tuned model and tokenizer
|
8 |
model_repo_path = 'sabssag/Latex_to_Python_CodeT5-base'
|
9 |
+
model = T5ForConditionalGeneration.from_pretrained(model_repo_path, torch_dtype=torch.float16)
|
10 |
+
tokenizer = RobertaTokenizer.from_pretrained(model_repo_path)
|
11 |
model.eval()
|
12 |
|
13 |
# Fix unmatched brackets
|