Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,6 +26,7 @@ summarizer = pipeline("summarization", model="human-centered-summarization/finan
|
|
26 |
fin_model = pipeline("sentiment-analysis", model='yiyanghkust/finbert-tone', tokenizer='yiyanghkust/finbert-tone')
|
27 |
fin_model_bis = pipeline("sentiment-analysis", model='ProsusAI/finbert', tokenizer='ProsusAI/finbert')
|
28 |
table_to_text = pipeline('text2text-generation', model='google/flan-t5-large')
|
|
|
29 |
|
30 |
def summarize_text(text):
|
31 |
resp = summarizer(text)
|
@@ -273,7 +274,7 @@ def generate_text(df, country, theme):
|
|
273 |
|
274 |
|
275 |
# Generate the descriptive text using the model
|
276 |
-
result =
|
277 |
|
278 |
return result
|
279 |
# Global variable
|
|
|
26 |
fin_model = pipeline("sentiment-analysis", model='yiyanghkust/finbert-tone', tokenizer='yiyanghkust/finbert-tone')
|
27 |
fin_model_bis = pipeline("sentiment-analysis", model='ProsusAI/finbert', tokenizer='ProsusAI/finbert')
|
28 |
table_to_text = pipeline('text2text-generation', model='google/flan-t5-large')
|
29 |
+
generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B')
|
30 |
|
31 |
def summarize_text(text):
|
32 |
resp = summarizer(text)
|
|
|
274 |
|
275 |
|
276 |
# Generate the descriptive text using the model
|
277 |
+
result = generator(prompt, max_length=200, temperature=0.7, top_p = 0.9, do_sample=True)[0]['generated_text']
|
278 |
|
279 |
return result
|
280 |
# Global variable
|