Spaces:
Sleeping
Sleeping
Commit
·
68aebec
1
Parent(s):
e8d874e
[fix] Return output_dir from build_ui for Hugging Face file access
Browse files
app.py
CHANGED
|
@@ -2,8 +2,7 @@ from src.ui import build_ui
|
|
| 2 |
|
| 3 |
if __name__ == "__main__":
|
| 4 |
# Build the user interface
|
| 5 |
-
ui = build_ui()
|
| 6 |
|
| 7 |
# Launch the UI in the browser with access to the "output" folder
|
| 8 |
-
ui.launch(server_name="0.0.0.0", server_port=7860, allowed_paths=[
|
| 9 |
-
|
|
|
|
| 2 |
|
| 3 |
if __name__ == "__main__":
|
| 4 |
# Build the user interface
|
| 5 |
+
ui, output_dir = build_ui()
|
| 6 |
|
| 7 |
# Launch the UI in the browser with access to the "output" folder
|
| 8 |
+
ui.launch(server_name="0.0.0.0", server_port=7860, allowed_paths=[output_dir])
|
|
|
src/ui.py
CHANGED
|
@@ -156,4 +156,4 @@ def build_ui(css_path="assets/styles.css"):
|
|
| 156 |
outputs=[file_download, run_btn, status_message]
|
| 157 |
)
|
| 158 |
|
| 159 |
-
return ui
|
|
|
|
| 156 |
outputs=[file_download, run_btn, status_message]
|
| 157 |
)
|
| 158 |
|
| 159 |
+
return ui, generator.output_dir
|