Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -135,5 +135,18 @@ with gr.Blocks() as app:
|
|
| 135 |
refresh_button = gr.Button("Refresh Images")
|
| 136 |
refresh_button.click(get_generated_images, outputs=[view_2d, view_3d])
|
| 137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
app.launch()
|
| 139 |
|
|
|
|
| 135 |
refresh_button = gr.Button("Refresh Images")
|
| 136 |
refresh_button.click(get_generated_images, outputs=[view_2d, view_3d])
|
| 137 |
|
| 138 |
+
def read_output_log():
|
| 139 |
+
"""Read and return the contents of output.log."""
|
| 140 |
+
if os.path.exists("output.log"):
|
| 141 |
+
with open("output.log", "r") as f:
|
| 142 |
+
return f.read()
|
| 143 |
+
else:
|
| 144 |
+
return "No output log found."
|
| 145 |
+
|
| 146 |
+
# Add this to the Gradio interface
|
| 147 |
+
log_output = gr.Textbox(label="Output Log", lines=10, interactive=False)
|
| 148 |
+
execute_button.click(execute_script, outputs=[execution_output, log_output])
|
| 149 |
+
|
| 150 |
+
|
| 151 |
app.launch()
|
| 152 |
|