Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
import streamlit as st
|
2 |
import torch
|
3 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
4 |
-
|
5 |
-
|
6 |
|
7 |
# Load the fine-tuned model and tokenizer
|
8 |
model_repo_path = 'sabssag/Latex_to_Python_CodeT5-base'
|
@@ -10,11 +10,6 @@ model = AutoModelForSeq2SeqLM.from_pretrained(model_repo_path)
|
|
10 |
tokenizer = AutoTokenizer.from_pretrained(model_repo_path)
|
11 |
model.eval()
|
12 |
|
13 |
-
|
14 |
-
import re
|
15 |
-
import ast
|
16 |
-
import torch
|
17 |
-
|
18 |
# Fix unmatched brackets
|
19 |
def fix_unmatched_brackets(code):
|
20 |
"""
|
|
|
1 |
import streamlit as st
|
2 |
import torch
|
3 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
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'
|
|
|
10 |
tokenizer = AutoTokenizer.from_pretrained(model_repo_path)
|
11 |
model.eval()
|
12 |
|
|
|
|
|
|
|
|
|
|
|
13 |
# Fix unmatched brackets
|
14 |
def fix_unmatched_brackets(code):
|
15 |
"""
|