Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -212,27 +212,8 @@ x^2 + y^2 = z^2
|
|
212 |
command = f'maths2svg --latex "{clean_latex}" --output {filename}.svg'
|
213 |
commands.append(command)
|
214 |
|
215 |
-
# Format the final output
|
216 |
-
output = "
|
217 |
-
for i, (equation, command) in enumerate(zip(equations, commands), 1):
|
218 |
-
output += f"### Equation {i}:\n"
|
219 |
-
output += f"LaTeX: `{equation}`\n"
|
220 |
-
output += f"Command: `{command}`\n\n"
|
221 |
-
|
222 |
-
# Add usage instructions
|
223 |
-
output += """## Usage Instructions:
|
224 |
-
1. Make sure you have maths2svg installed
|
225 |
-
2. Copy and run each command in your terminal
|
226 |
-
3. Each command will generate an SVG file with the equation
|
227 |
-
|
228 |
-
## Example Usage:
|
229 |
-
```bash
|
230 |
-
# Run individual commands:
|
231 |
-
""" + "\n".join(commands) + """
|
232 |
-
```
|
233 |
-
|
234 |
-
## Batch Usage:
|
235 |
-
Save all commands to a script file and run them together."""
|
236 |
|
237 |
return output
|
238 |
else:
|
|
|
212 |
command = f'maths2svg --latex "{clean_latex}" --output {filename}.svg'
|
213 |
commands.append(command)
|
214 |
|
215 |
+
# Format the final output - just the commands
|
216 |
+
output = "\n".join(commands)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
|
218 |
return output
|
219 |
else:
|