sabssag commited on
Commit
d74b748
·
verified ·
1 Parent(s): c69c4af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -3,10 +3,9 @@ import torch
3
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
4
 
5
  # Load the fine-tuned model and tokenizer
6
- model_path = '/content/drive/MyDrive/Model/model'
7
- tokenizer_path = '/content/drive/MyDrive/Model/tokenizer'
8
- model = AutoModelForSeq2SeqLM.from_pretrained(model_path)
9
- tokenizer = AutoTokenizer.from_pretrained(tokenizer_path)
10
 
11
  # Function to generate Python code from LaTeX expression
12
  def generate_code(latex_expr, tokenizer, model, max_length=512):
 
3
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
4
 
5
  # Load the fine-tuned model and tokenizer
6
+ model_repo_path = 'sabssag/Latex_to_Python_T5-small'
7
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_repo_path)
8
+ tokenizer = AutoTokenizer.from_pretrained(model_repo_path)
 
9
 
10
  # Function to generate Python code from LaTeX expression
11
  def generate_code(latex_expr, tokenizer, model, max_length=512):