Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,8 @@ from transformers import pipeline
|
|
9 |
|
10 |
# Initialize Models
|
11 |
summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
|
12 |
-
chat_model = pipeline("text-generation", model="
|
|
|
13 |
|
14 |
# API Key
|
15 |
POLYGON_API_KEY = os.getenv("POLYGON_API_KEY")
|
@@ -157,8 +158,8 @@ def generate_summary(info, ratios):
|
|
157 |
|
158 |
def answer_investing_question(question):
|
159 |
response = chat_model(question)[0]['generated_text']
|
160 |
-
|
161 |
-
|
162 |
|
163 |
|
164 |
|
|
|
9 |
|
10 |
# Initialize Models
|
11 |
summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
|
12 |
+
chat_model = pipeline("text-generation", model="tiiuae/falcon-7b-instruct", max_length=256)
|
13 |
+
|
14 |
|
15 |
# API Key
|
16 |
POLYGON_API_KEY = os.getenv("POLYGON_API_KEY")
|
|
|
158 |
|
159 |
def answer_investing_question(question):
|
160 |
response = chat_model(question)[0]['generated_text']
|
161 |
+
return response
|
162 |
+
|
163 |
|
164 |
|
165 |
|