Spaces:
Running
Running
Update pages/3_WithExercises.py
Browse files- pages/3_WithExercises.py +1 -1
pages/3_WithExercises.py
CHANGED
|
@@ -364,7 +364,7 @@ code_input = st.text_area("Enter your PyTorch code here", height=300, value=exer
|
|
| 364 |
# Button to execute the code
|
| 365 |
if st.button("Run Code"):
|
| 366 |
# Prepend the import statement
|
| 367 |
-
code_to_run = "import torch
|
| 368 |
|
| 369 |
# Execute the code and capture the output
|
| 370 |
output, variables = execute_code(code_to_run)
|
|
|
|
| 364 |
# Button to execute the code
|
| 365 |
if st.button("Run Code"):
|
| 366 |
# Prepend the import statement
|
| 367 |
+
code_to_run = "import torch" + code_input
|
| 368 |
|
| 369 |
# Execute the code and capture the output
|
| 370 |
output, variables = execute_code(code_to_run)
|