Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -113,8 +113,12 @@ def generate_summary(info, ratios):
|
|
113 |
return summary
|
114 |
|
115 |
def answer_investing_question(question):
|
116 |
-
|
117 |
-
|
|
|
|
|
|
|
|
|
118 |
return response
|
119 |
|
120 |
def calculate_ratios(market_cap, total_revenue, price, dividend_amount, assumed_eps=5.0, growth_rate=0.1, book_value=500000000):
|
|
|
113 |
return summary
|
114 |
|
115 |
def answer_investing_question(question):
|
116 |
+
prompt = (
|
117 |
+
f"Someone asked: '{question}'. "
|
118 |
+
f"Please answer clearly but thoroughly and in a conversational tone without restating the question. "
|
119 |
+
f"Keep the answer beginner-friendly and encouraging."
|
120 |
+
)
|
121 |
+
response = summarizer(prompt, max_length=200, min_length=60, do_sample=False)[0]['summary_text']
|
122 |
return response
|
123 |
|
124 |
def calculate_ratios(market_cap, total_revenue, price, dividend_amount, assumed_eps=5.0, growth_rate=0.1, book_value=500000000):
|