Spaces:
Running
Running
update gradio UI
Browse files
app.py
CHANGED
|
@@ -234,15 +234,15 @@ with gr.Blocks(theme=gr.themes.Monochrome()) as app:
|
|
| 234 |
report_output = gr.Markdown(label="π Intelligence Report")
|
| 235 |
|
| 236 |
def analyze_crypto(crypto, currency, days):
|
| 237 |
-
|
| 238 |
time.sleep(0.5)
|
| 239 |
try:
|
| 240 |
report = generate_report(crypto, currency, days)
|
| 241 |
-
|
| 242 |
-
return
|
| 243 |
except Exception as e:
|
| 244 |
-
|
| 245 |
-
return
|
| 246 |
|
| 247 |
run_button.click(
|
| 248 |
analyze_crypto,
|
|
|
|
| 234 |
report_output = gr.Markdown(label="π Intelligence Report")
|
| 235 |
|
| 236 |
def analyze_crypto(crypto, currency, days):
|
| 237 |
+
spinner_html = "<p> β³ <b>Running...</b></p>"
|
| 238 |
time.sleep(0.5)
|
| 239 |
try:
|
| 240 |
report = generate_report(crypto, currency, days)
|
| 241 |
+
spinner_html = "<p>β
<b>Complete!</b></p>"
|
| 242 |
+
return spinner_html, report
|
| 243 |
except Exception as e:
|
| 244 |
+
spinner_html = f"<p>β Error: {e}</p>"
|
| 245 |
+
return spinner_html, "An error occurred during analysis."
|
| 246 |
|
| 247 |
run_button.click(
|
| 248 |
analyze_crypto,
|