Spaces:
Sleeping
Sleeping
Commit Β·
cdb8eff
1
Parent(s): 5d65432
Fix
Browse files
app.py
CHANGED
|
@@ -357,7 +357,7 @@ css = """
|
|
| 357 |
custom_theme = gr.themes.Soft(primary_hue="indigo", secondary_hue="slate", neutral_hue="slate", font=[gr.themes.GoogleFont("Inter"), "ui-sans-serif", "system-ui", "sans-serif"])
|
| 358 |
|
| 359 |
# ββ UI ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 360 |
-
with gr.Blocks(title="School Data Fetcher") as app:
|
| 361 |
gr.Markdown("# π« School Data Fetcher", elem_id="title")
|
| 362 |
gr.Markdown("Select a state and categories below to get started.", elem_id="subtitle")
|
| 363 |
with gr.Row():
|
|
@@ -398,10 +398,9 @@ with gr.Blocks(title="School Data Fetcher") as app:
|
|
| 398 |
|
| 399 |
|
| 400 |
if __name__ == "__main__":
|
| 401 |
-
launch_kwargs = dict(css=css, theme=custom_theme)
|
| 402 |
if os.environ.get("SPACE_ID"):
|
| 403 |
print("Starting on Hugging Face Spaces (0.0.0.0:7860) β¦")
|
| 404 |
-
app.queue().launch(server_name="0.0.0.0", server_port=7860
|
| 405 |
else:
|
| 406 |
-
print("Starting
|
| 407 |
-
app.queue().launch(server_name="127.0.0.1", server_port=7861, inbrowser=True
|
|
|
|
| 357 |
custom_theme = gr.themes.Soft(primary_hue="indigo", secondary_hue="slate", neutral_hue="slate", font=[gr.themes.GoogleFont("Inter"), "ui-sans-serif", "system-ui", "sans-serif"])
|
| 358 |
|
| 359 |
# ββ UI ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 360 |
+
with gr.Blocks(title="School Data Fetcher", css=css, theme=custom_theme) as app:
|
| 361 |
gr.Markdown("# π« School Data Fetcher", elem_id="title")
|
| 362 |
gr.Markdown("Select a state and categories below to get started.", elem_id="subtitle")
|
| 363 |
with gr.Row():
|
|
|
|
| 398 |
|
| 399 |
|
| 400 |
if __name__ == "__main__":
|
|
|
|
| 401 |
if os.environ.get("SPACE_ID"):
|
| 402 |
print("Starting on Hugging Face Spaces (0.0.0.0:7860) β¦")
|
| 403 |
+
app.queue().launch(server_name="0.0.0.0", server_port=7860)
|
| 404 |
else:
|
| 405 |
+
print("Starting locally β¦")
|
| 406 |
+
app.queue().launch(server_name="127.0.0.1", server_port=7861, inbrowser=True)
|