mobenta commited on
Commit
8e9c3b9
·
verified ·
1 Parent(s): 4b78d37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -1
app.py CHANGED
@@ -302,4 +302,21 @@ def gradio_app():
302
  interval = gr.Dropdown(label="Interval", choices=['1d', '5d', '1wk', '1mo', '3mo'], value='1d')
303
 
304
  with gr.Row():
305
- indicators = gr.CheckboxGroup(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
  interval = gr.Dropdown(label="Interval", choices=['1d', '5d', '1wk', '1mo', '3mo'], value='1d')
303
 
304
  with gr.Row():
305
+ indicators = gr.CheckboxGroup(label="Indicators", choices=['RSI', 'SMA21', 'SMA50', 'SMA200', 'VWAP', 'Bollinger Bands'], value=['SMA21', 'SMA50'])
306
+ analysis_type = gr.Radio(label="Analysis Type", choices=['Single Ticker', 'Comparative Analysis', 'Trend Analysis', 'Correlation Analysis'], value='Single Ticker')
307
+
308
+ query = gr.Textbox(label="Analysis Query", value="Analyze the price trends.")
309
+ analyze_button = gr.Button("Analyze")
310
+ output_image = gr.Image(label="Analysis Chart")
311
+ output_text = gr.Textbox(label="Generated Insights", lines=10)
312
+
313
+ analyze_button.click(
314
+ fn=gradio_interface,
315
+ inputs=[ticker1, ticker2, ticker3, ticker4, start_date, end_date, query, analysis_type, interval, indicators],
316
+ outputs=[output_text, output_image]
317
+ )
318
+
319
+ demo.launch()
320
+
321
+ if __name__ == "__main__":
322
+ gradio_app()