Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -346,6 +346,7 @@ def get_prompt_by_row_new(stock, row):
|
|
346 |
|
347 |
return head, filtered_news, basics
|
348 |
|
|
|
349 |
def get_all_prompts_online(symbol, with_basics=True, max_news_perweek = 5, weeks_before = 2):
|
350 |
|
351 |
end_date = get_curday()
|
@@ -392,7 +393,6 @@ def get_all_prompts_online(symbol, with_basics=True, max_news_perweek = 5, weeks
|
|
392 |
|
393 |
return info, prompt
|
394 |
|
395 |
-
@spaces.GPU
|
396 |
def ask(symbol, weeks_before, withbasic):
|
397 |
|
398 |
# load inference data
|
@@ -434,20 +434,20 @@ server = gr.Interface(
|
|
434 |
value=2,
|
435 |
step=1,
|
436 |
label="weeks_before",
|
437 |
-
info="
|
438 |
),
|
439 |
gr.Checkbox(
|
440 |
label="Use Latest Basic Financials",
|
441 |
value=True,
|
442 |
-
info="
|
443 |
)
|
444 |
],
|
445 |
outputs=[
|
446 |
gr.Textbox(
|
447 |
-
label="
|
448 |
),
|
449 |
gr.Textbox(
|
450 |
-
label="
|
451 |
)
|
452 |
],
|
453 |
title="FinGPT-Forecaster-Chinese",
|
|
|
346 |
|
347 |
return head, filtered_news, basics
|
348 |
|
349 |
+
@spaces.GPU
|
350 |
def get_all_prompts_online(symbol, with_basics=True, max_news_perweek = 5, weeks_before = 2):
|
351 |
|
352 |
end_date = get_curday()
|
|
|
393 |
|
394 |
return info, prompt
|
395 |
|
|
|
396 |
def ask(symbol, weeks_before, withbasic):
|
397 |
|
398 |
# load inference data
|
|
|
434 |
value=2,
|
435 |
step=1,
|
436 |
label="weeks_before",
|
437 |
+
info="由于令牌长度限制,建议输入2。"
|
438 |
),
|
439 |
gr.Checkbox(
|
440 |
label="Use Latest Basic Financials",
|
441 |
value=True,
|
442 |
+
info="如果勾选,则考虑公司最新季度报告的基本财务状况。"
|
443 |
)
|
444 |
],
|
445 |
outputs=[
|
446 |
gr.Textbox(
|
447 |
+
label="提供的信息"
|
448 |
),
|
449 |
gr.Textbox(
|
450 |
+
label="响应"
|
451 |
)
|
452 |
],
|
453 |
title="FinGPT-Forecaster-Chinese",
|