cicboy commited on
Commit
cf8a2ea
Β·
1 Parent(s): 0a2849e

update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -9
app.py CHANGED
@@ -236,9 +236,7 @@ def generate_report(crypto_name, currency, days):
236
  # Loop over progress stages
237
  for i, message in enumerate(steps, start=1):
238
  progress(i / len(steps), message)
239
- # We can't break up CrewAI tasks individually, but this at least updates UI
240
-
241
- # Run CrewAI (blocking)
242
  result = crypto_analysis_crew.kickoff(inputs=crypto_inputs)
243
 
244
  # Return final result
@@ -261,17 +259,22 @@ with gr.Blocks(theme=gr.themes.Monochrome()) as app:
261
  placeholder="Type cryptocurrency name...",
262
  value="bitcoin"
263
  )
264
- currency = gr.Dropdown(["usd", "eur", "gbp"], label="Currency", value="usd")
265
- days = gr.Slider(30, 730, value=365, step=15, label="Historical Lookback (days)")
 
 
 
 
 
 
 
266
 
267
  run_button = gr.Button("πŸš€ Run Full Analysis", variant="primary")
268
-
269
- progress_message = gr.Markdown()
270
  report_output = gr.Markdown(label="πŸ“Š Intelligence Report")
271
 
272
  run_button.click(
273
  generate_report,
274
  inputs=[crypto, currency, days],
275
- outputs=[progress_message, report_output]
276
  show_progress=True
277
- )
 
236
  # Loop over progress stages
237
  for i, message in enumerate(steps, start=1):
238
  progress(i / len(steps), message)
239
+
 
 
240
  result = crypto_analysis_crew.kickoff(inputs=crypto_inputs)
241
 
242
  # Return final result
 
259
  placeholder="Type cryptocurrency name...",
260
  value="bitcoin"
261
  )
262
+ currency = gr.Dropdown(
263
+ ["usd", "eur", "gbp"],
264
+ label="Currency",
265
+ value="usd"
266
+ )
267
+ days = gr.Slider(
268
+ minimum=30, maximum=730, value=365, step=15,
269
+ label="Historical Lookback (days)"
270
+ )
271
 
272
  run_button = gr.Button("πŸš€ Run Full Analysis", variant="primary")
 
 
273
  report_output = gr.Markdown(label="πŸ“Š Intelligence Report")
274
 
275
  run_button.click(
276
  generate_report,
277
  inputs=[crypto, currency, days],
278
+ outputs=report_output,
279
  show_progress=True
280
+ )