mouliraj56 commited on
Commit
4f4fc8e
·
1 Parent(s): 6ee5dda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -13
app.py CHANGED
@@ -107,6 +107,24 @@ tickers_info="""
107
  - **QQQ:** Invesco QQQ Trust
108
  - **IWM:** iShares Russell 2000 ETF
109
  """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  with gr.Blocks() as demo:
111
  gr.Interface(
112
  forecast_stock, # Function to execute on submit
@@ -117,22 +135,14 @@ with gr.Blocks() as demo:
117
 
118
  ],
119
  "plot", # Output type
120
- # Disable live updates
121
  title="Stock Price Forecast",
122
  description="Enter a stock ticker, desired data period, and interval to generate a forecast.",
123
- examples = [
124
- ["AAPL", "2mo", "1d"], # Apple stock, data for 2 months, daily intervals
125
- ["GOOG", "1y", "1d"], # Google stock, data for 1 year, daily intervals
126
- ["MSFT", "5y", "1wk"], # Microsoft stock, data for 5 years, weekly intervals
127
- ["TSLA", "max", "1h"], # Tesla stock, maximum available data, hourly intervals
128
- ["AMZN", "1y", "1h"], # Amazon stock, data for 1 year, hourly intervals
129
- ["NVDA", "3mo", "1d"], # NVIDIA stock, data for 3 months, daily intervals
130
- ["FB", "1y", "1wk"], # Meta Platforms (Facebook) stock, data for 1 year, weekly intervals
131
- ["JNJ", "2y", "1d"], # Johnson & Johnson stock, data for 2 years, daily intervals
132
- ["BAC", "6mo", "1d"], # Bank of America stock, data for 6 months, daily intervals
133
- ["XOM", "1y", "1wk"], # Exxon Mobil stock, data for 1 year, weekly intervals
134
- ]
135
  )
 
 
 
136
  with gr.Accordion("Open for More info"):
137
  gr.Markdown(tickers_info)
138
 
 
107
  - **QQQ:** Invesco QQQ Trust
108
  - **IWM:** iShares Russell 2000 ETF
109
  """
110
+ examples = """This table demonstrates examples of stock forecasts you can generate using the application:
111
+
112
+ | Ticker | Period | Interval |
113
+ |---|---|---|
114
+ | AAPL | 2mo | 1d |
115
+ | GOOG | 1y | 1d |
116
+ | MSFT | 5y | 1wk |
117
+ | TSLA | max | 1h |
118
+ | AMZN | 1y | 1h |
119
+ | NVDA | 3mo | 1d |
120
+ | FB | 1y | 1wk |
121
+ | JNJ | 2y | 1d |
122
+ | BAC | 6mo | 1d |
123
+ | XOM | 1y | 1wk |
124
+
125
+ To generate a forecast for a specific stock, simply enter the ticker symbol, desired period, and interval into the interface.
126
+ """
127
+
128
  with gr.Blocks() as demo:
129
  gr.Interface(
130
  forecast_stock, # Function to execute on submit
 
135
 
136
  ],
137
  "plot", # Output type
138
+ live=False, # Disable live updates
139
  title="Stock Price Forecast",
140
  description="Enter a stock ticker, desired data period, and interval to generate a forecast.",
141
+
 
 
 
 
 
 
 
 
 
 
 
142
  )
143
+ with gr.Accordion("Example Stock Forecasts"):
144
+ gr.Markdown(examples)
145
+
146
  with gr.Accordion("Open for More info"):
147
  gr.Markdown(tickers_info)
148