Spaces:
Sleeping
Sleeping
updated to file-prefix
Browse files
app.py
CHANGED
@@ -74,8 +74,8 @@ print(f"Imports completed: {time.strftime('%Y-%m-%d %H:%M:%S')}")
|
|
74 |
|
75 |
|
76 |
# Instead of FastAPI setup, just use Gradio's file serving
|
77 |
-
static_dir = Path("static")
|
78 |
-
static_dir.mkdir(exist_ok=True)
|
79 |
gr.set_static_paths(paths=["static/"])
|
80 |
|
81 |
# Resource configuration
|
@@ -451,8 +451,7 @@ def predict(request: gr.Request, text_input, sample_size_slider, reduce_sample_c
|
|
451 |
|
452 |
progress(1.0, desc="Done!")
|
453 |
print(f"Total pipeline completed in {time.time() - start_time:.2f} seconds")
|
454 |
-
|
455 |
-
iframe = f"""<iframe src="/static/{html_file_name}" width="100%" height="1000px"></iframe>"""
|
456 |
|
457 |
# Return iframe and download buttons with appropriate visibility
|
458 |
return [
|
|
|
74 |
|
75 |
|
76 |
# Instead of FastAPI setup, just use Gradio's file serving
|
77 |
+
static_dir = Path("./static")
|
78 |
+
static_dir.mkdir(parents=True, exist_ok=True)
|
79 |
gr.set_static_paths(paths=["static/"])
|
80 |
|
81 |
# Resource configuration
|
|
|
451 |
|
452 |
progress(1.0, desc="Done!")
|
453 |
print(f"Total pipeline completed in {time.time() - start_time:.2f} seconds")
|
454 |
+
iframe = f"""<iframe src="file={html_file_path}" width="100%" height="1000px"></iframe>"""
|
|
|
455 |
|
456 |
# Return iframe and download buttons with appropriate visibility
|
457 |
return [
|