Spaces:
Sleeping
Sleeping
update app.py
Browse files
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 |
-
|
| 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(
|
| 265 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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=
|
| 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 |
+
)
|