sabssag commited on
Commit
e6bfaba
1 Parent(s): 26c35dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -197,7 +197,7 @@ def post_process_code(code):
197
 
198
  # Generate the final code from LaTeX
199
  def generate_code(latex_expression, max_length=512):
200
- inputs = tokenizer(f"Latex Expression: {latex_expression} Solution:", return_tensors="pt").to("cuda")
201
  outputs = model.generate(**inputs, max_length=max_length)
202
  generated_code = tokenizer.decode(outputs[0], skip_special_tokens=True)
203
  post_processed_code = post_process_code(generated_code)
 
197
 
198
  # Generate the final code from LaTeX
199
  def generate_code(latex_expression, max_length=512):
200
+ inputs = tokenizer(f"Latex Expression: {latex_expression} Solution:", return_tensors="pt")
201
  outputs = model.generate(**inputs, max_length=max_length)
202
  generated_code = tokenizer.decode(outputs[0], skip_special_tokens=True)
203
  post_processed_code = post_process_code(generated_code)