cicboy commited on
Commit
9edc788
Β·
1 Parent(s): b5be632

update gradio UI

Browse files
Files changed (1) hide show
  1. app.py +10 -13
app.py CHANGED
@@ -191,8 +191,6 @@ crypto_analysis_crew = Crew(
191
  verbose=True
192
  )
193
 
194
-
195
-
196
  # define the main gradio handler
197
  def generate_report(crypto_name, currency, days):
198
  crypto_trading_inputs={
@@ -208,6 +206,15 @@ def generate_report(crypto_name, currency, days):
208
  return result["final_output"]
209
  return str(result)
210
 
 
 
 
 
 
 
 
 
 
211
  #Gradio interface
212
  with gr.Blocks(theme=gr.themes.Monochrome()) as app:
213
  gr.Markdown("# πŸͺ™ Crypto Intelligence Dashboard")
@@ -232,20 +239,10 @@ with gr.Blocks(theme=gr.themes.Monochrome()) as app:
232
  run_button = gr.Button("πŸš€ Run Full Analysis", variant="primary")
233
 
234
  # Add a simple status box to show "Complete!" text
235
- status_box = gr.Textbox(
236
- label="Status",
237
- value="Idle",
238
- interactive=False,
239
- )
240
 
241
  report_output = gr.Markdown(label="πŸ“Š Intelligence Report")
242
 
243
- def analyze_crypto(crypto, currency, days, progress=gr.Progress(track_tqdm=True)):
244
- progress(0, desc="Starting analysis...")
245
- report = generate_report(crypto, currency, days)
246
- progress(1, desc="Analysis complete!")
247
- return "βœ… Analysis Complete!", report
248
-
249
  run_button.click(
250
  analyze_crypto,
251
  inputs=[crypto, currency, days],
 
191
  verbose=True
192
  )
193
 
 
 
194
  # define the main gradio handler
195
  def generate_report(crypto_name, currency, days):
196
  crypto_trading_inputs={
 
206
  return result["final_output"]
207
  return str(result)
208
 
209
+ def analyze_crypto(crypto, currency, days):
210
+ yield "⏳ Starting analysis...", None
211
+ time.sleep(1)
212
+ yield "πŸ“Š Fetching live & historical market data...", None
213
+ time.sleep(1)
214
+ yield "🧠 Running multi-agent reasoning (market, sentiment, history)...", None
215
+ report = generate_report(crypto, currency, days)
216
+ yield "βœ… Analysis Complete!", report
217
+
218
  #Gradio interface
219
  with gr.Blocks(theme=gr.themes.Monochrome()) as app:
220
  gr.Markdown("# πŸͺ™ Crypto Intelligence Dashboard")
 
239
  run_button = gr.Button("πŸš€ Run Full Analysis", variant="primary")
240
 
241
  # Add a simple status box to show "Complete!" text
242
+ status_box = gr.Markdown("πŸ’€ Idle")
 
 
 
 
243
 
244
  report_output = gr.Markdown(label="πŸ“Š Intelligence Report")
245
 
 
 
 
 
 
 
246
  run_button.click(
247
  analyze_crypto,
248
  inputs=[crypto, currency, days],