Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -346,7 +346,15 @@ label { color: var(--muted) !important; font-size: .8rem !important; font-family
|
|
| 346 |
def build_app():
|
| 347 |
agent = BERTopicAgent()
|
| 348 |
|
| 349 |
-
with gr.Blocks(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 350 |
|
| 351 |
# ββ State ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 352 |
state_csv_path = gr.State(None) # path to uploaded CSV
|
|
@@ -606,16 +614,9 @@ def build_app():
|
|
| 606 |
# The `if __name__ == "__main__"` guard prevented launch() from running on Spaces
|
| 607 |
# because HF imports app.py rather than executing it as a script.
|
| 608 |
app = build_app()
|
| 609 |
-
app.launch(
|
| 610 |
-
|
| 611 |
-
|
| 612 |
-
|
| 613 |
-
|
| 614 |
-
|
| 615 |
-
theme=gr.themes.Base(
|
| 616 |
-
primary_hue="blue",
|
| 617 |
-
neutral_hue="slate",
|
| 618 |
-
font=[gr.themes.GoogleFont("Lato"), "sans-serif"],
|
| 619 |
-
),
|
| 620 |
-
css=CUSTOM_CSS,
|
| 621 |
-
)
|
|
|
|
| 346 |
def build_app():
|
| 347 |
agent = BERTopicAgent()
|
| 348 |
|
| 349 |
+
with gr.Blocks(
|
| 350 |
+
title="BERTopic Agent",
|
| 351 |
+
theme=gr.themes.Base(
|
| 352 |
+
primary_hue="blue",
|
| 353 |
+
neutral_hue="slate",
|
| 354 |
+
font=[gr.themes.GoogleFont("Lato"), "sans-serif"],
|
| 355 |
+
),
|
| 356 |
+
css=CUSTOM_CSS
|
| 357 |
+
) as demo:
|
| 358 |
|
| 359 |
# ββ State ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 360 |
state_csv_path = gr.State(None) # path to uploaded CSV
|
|
|
|
| 614 |
# The `if __name__ == "__main__"` guard prevented launch() from running on Spaces
|
| 615 |
# because HF imports app.py rather than executing it as a script.
|
| 616 |
app = build_app()
|
| 617 |
+
app.launch(
|
| 618 |
+
server_name="0.0.0.0",
|
| 619 |
+
server_port=7860,
|
| 620 |
+
share=False,
|
| 621 |
+
show_error=True
|
| 622 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|