File size: 588 Bytes
f25e868
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr

def gradio_analyze(ticker, stock_data, headlines_text):
    headlines = [h.strip() for h in headlines_text.split('\n') if h.strip()]
    result = full_stockai_analysis(ticker, '', stock_data, headlines)
    return result['report']

gr.Interface(
    fn=gradio_analyze,
    inputs=[
        gr.Textbox(label='Ticker (e.g. NVDA)'),
        gr.Textbox(label='Stock Data', lines=8),
        gr.Textbox(label='News Headlines (one per line)', lines=5)
    ],
    outputs=gr.Textbox(label='Investment Report', lines=20),
    title='StockAI — Financial Analyzer'
).launch()