Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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")
|
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)
|