pschofield2 commited on
Commit
78836e4
·
verified ·
1 Parent(s): 29c390a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -208,7 +208,7 @@ def analyze_stock(ticker: str) -> str:
208
  openai_api_key = os.getenv('OPENAI_API_KEY')
209
  prompt = generate_gpt_prompt(ticker, fmp_api_key)
210
  analysis = run_gpt_model(prompt, openai_api_key)
211
- return analysis
212
 
213
  description = """We gave Ann-E a name, but not a personality. It's time to change that!
214
 
@@ -221,7 +221,13 @@ description = """We gave Ann-E a name, but not a personality. It's time to chang
221
 
222
 
223
  # Gradio Interface
224
- iface = gr.Interface(fn=analyze_stock, inputs="text", outputs="text", title="Stock Analysis GPT Model",
 
 
 
 
 
 
225
  description=description)
226
 
227
  if __name__ == "__main__":
 
208
  openai_api_key = os.getenv('OPENAI_API_KEY')
209
  prompt = generate_gpt_prompt(ticker, fmp_api_key)
210
  analysis = run_gpt_model(prompt, openai_api_key)
211
+ return prompt, analysis
212
 
213
  description = """We gave Ann-E a name, but not a personality. It's time to change that!
214
 
 
221
 
222
 
223
  # Gradio Interface
224
+ iface = gr.Interface(fn=analyze_stock,
225
+ inputs=gr.Textbox(label = 'Enter a Ticker'),
226
+ outputs= [
227
+ gr.Textbox(label = 'Information for Model'),
228
+ gr.Textbox(label = 'Ann-E Response')
229
+ ],
230
+ title="Stock Analysis GPT Model",
231
  description=description)
232
 
233
  if __name__ == "__main__":