cicboy commited on
Commit
8b85e2d
Β·
1 Parent(s): ac26b4d

update gradio UI

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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
- spinner(value="<p> ⏳ <b>Running...</b></p>")
238
  time.sleep(0.5)
239
  try:
240
  report = generate_report(crypto, currency, days)
241
- spinner(value="<p>βœ… <b>Complete!</b></p>")
242
- return spinner, report
243
  except Exception as e:
244
- spinner = f"<p>❌ Error: {e}</p>"
245
- return spinner, "An error occurred during analysis."
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,