Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -83,20 +83,26 @@ def stock_forecast(ticker, start_date='2022-01-01', end_date='2026-01-01'):
|
|
83 |
return fig1, fig2, img
|
84 |
|
85 |
|
86 |
-
|
87 |
-
# %%
|
88 |
# Create Gradio interface
|
89 |
interface = gr.Interface(
|
90 |
fn=stock_forecast, # Function to run
|
91 |
-
inputs=[
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
|
|
|
|
|
|
|
|
|
|
99 |
)
|
100 |
|
101 |
# Launch the Gradio app
|
102 |
interface.launch()
|
|
|
|
|
|
|
|
83 |
return fig1, fig2, img
|
84 |
|
85 |
|
|
|
|
|
86 |
# Create Gradio interface
|
87 |
interface = gr.Interface(
|
88 |
fn=stock_forecast, # Function to run
|
89 |
+
inputs=[
|
90 |
+
gr.Textbox(label="Enter Stock Ticker", value="NVDA"),
|
91 |
+
gr.Textbox(label="Enter Start Date (YYYY-MM-DD)", value="2022-01-01"),
|
92 |
+
gr.Textbox(label="Enter End Date (YYYY-MM-DD)", value="2026-01-01")
|
93 |
+
],
|
94 |
+
outputs=[
|
95 |
+
gr.Plot(label="Stock Closing Prices"),
|
96 |
+
gr.Plot(label="30 Days Forecast"),
|
97 |
+
gr.Image(label="Forecast Components")
|
98 |
+
],
|
99 |
+
title="Wall Street Forecast",
|
100 |
+
description="Enter a stock ticker symbol, a start date, and an end date (in YYYY-MM-DD format) to view the historical closing prices, a 30-day forecast, and the forecast components.",
|
101 |
+
theme=gr.themes.Monochrome() # Set the theme here
|
102 |
)
|
103 |
|
104 |
# Launch the Gradio app
|
105 |
interface.launch()
|
106 |
+
|
107 |
+
|
108 |
+
|