Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,7 @@ from typing import Dict, Any
|
|
| 4 |
import snowflake.connector
|
| 5 |
from openai import OpenAI
|
| 6 |
import gradio as gr
|
|
|
|
| 7 |
|
| 8 |
def get_financial_data(ticker: str, api_key: str, period: str = 'annual') -> Dict[str, Any]:
|
| 9 |
base_url = "https://financialmodelingprep.com/api/v3/"
|
|
@@ -243,6 +244,7 @@ Finally, it is critically important that you comply with the legal guideline of
|
|
| 243 |
chunk_content = chunk.choices[0].delta.content or ""
|
| 244 |
if chunk_content:
|
| 245 |
yield chunk_content
|
|
|
|
| 246 |
|
| 247 |
def analyze_stock(ticker: str):
|
| 248 |
fmp_api_key = os.getenv('FMP_API_KEY')
|
|
|
|
| 4 |
import snowflake.connector
|
| 5 |
from openai import OpenAI
|
| 6 |
import gradio as gr
|
| 7 |
+
import time
|
| 8 |
|
| 9 |
def get_financial_data(ticker: str, api_key: str, period: str = 'annual') -> Dict[str, Any]:
|
| 10 |
base_url = "https://financialmodelingprep.com/api/v3/"
|
|
|
|
| 244 |
chunk_content = chunk.choices[0].delta.content or ""
|
| 245 |
if chunk_content:
|
| 246 |
yield chunk_content
|
| 247 |
+
time.sleep(0.5)
|
| 248 |
|
| 249 |
def analyze_stock(ticker: str):
|
| 250 |
fmp_api_key = os.getenv('FMP_API_KEY')
|