feat: add file explorer tab to view saved models and logs in HF Space UI
Browse files- Added a π Files tab to Gradio using gr.FileExplorer
- Allows browsing contents of /home/user/app, including saved_model/
- Helps debug file persistence and inspect training outputs
app.py
CHANGED
@@ -5,7 +5,7 @@ from train_abuse_model import (
|
|
5 |
push_model_to_hub
|
6 |
)
|
7 |
from predict_pipeline import run_prediction_pipeline
|
8 |
-
|
9 |
|
10 |
with gr.Blocks() as demo:
|
11 |
gr.Markdown("## π§ Abuse Detection App")
|
@@ -35,5 +35,8 @@ with gr.Blocks() as demo:
|
|
35 |
outputs=[enriched_output, label_output]
|
36 |
)
|
37 |
|
|
|
|
|
|
|
38 |
if __name__ == "__main__":
|
39 |
demo.launch()
|
|
|
5 |
push_model_to_hub
|
6 |
)
|
7 |
from predict_pipeline import run_prediction_pipeline
|
8 |
+
from pathlib import Path
|
9 |
|
10 |
with gr.Blocks() as demo:
|
11 |
gr.Markdown("## π§ Abuse Detection App")
|
|
|
35 |
outputs=[enriched_output, label_output]
|
36 |
)
|
37 |
|
38 |
+
with gr.Tab("π Files"):
|
39 |
+
files_list = gr.FileExplorer(value=str(Path("/home/user/app")), label="Browse Saved Files")
|
40 |
+
|
41 |
if __name__ == "__main__":
|
42 |
demo.launch()
|