Spaces:
Sleeping
Sleeping
Commit
·
22ecb97
1
Parent(s):
a89af3a
Update app.py
Browse files
app.py
CHANGED
@@ -35,8 +35,8 @@ def predict_vn_index(option=None):
|
|
35 |
fig2 = m.plot_latest_forecast(forecast) # Replace this line with code to generate the second image
|
36 |
fig2_path = "forecast_plot2.png"
|
37 |
fig2.savefig(fig2_path)
|
38 |
-
description = "
|
39 |
-
disclaimer = "
|
40 |
|
41 |
|
42 |
return fig1_path, fig2_path, description, disclaimer
|
@@ -45,12 +45,12 @@ def predict_vn_index(option=None):
|
|
45 |
if __name__ == "__main__":
|
46 |
dropdown = gr.inputs.Dropdown(["VNIndex"], label="Choose an option", default="VNIndex")
|
47 |
outputs = [
|
48 |
-
gr.outputs.Image(type="filepath", label="
|
49 |
-
gr.outputs.Image(type="filepath", label="
|
50 |
-
gr.outputs.Textbox(label="
|
51 |
gr.outputs.Textbox(label="Disclaimer")
|
52 |
]
|
53 |
-
interface = gr.Interface(fn=predict_vn_index, inputs=dropdown, outputs=outputs, title="
|
54 |
interface.launch()
|
55 |
|
56 |
|
|
|
35 |
fig2 = m.plot_latest_forecast(forecast) # Replace this line with code to generate the second image
|
36 |
fig2_path = "forecast_plot2.png"
|
37 |
fig2.savefig(fig2_path)
|
38 |
+
description = "The predictions are conducted by a Deep Learning AI algorithm, and data augmentation is performed by the AI Consultant team. Data is updated after 5 PM GMT+7 on trading days."
|
39 |
+
disclaimer = "Please consider this as a reference only; the company holds no responsibility for your investment status."
|
40 |
|
41 |
|
42 |
return fig1_path, fig2_path, description, disclaimer
|
|
|
45 |
if __name__ == "__main__":
|
46 |
dropdown = gr.inputs.Dropdown(["VNIndex"], label="Choose an option", default="VNIndex")
|
47 |
outputs = [
|
48 |
+
gr.outputs.Image(type="filepath", label="The VN Index price history and forecast"),
|
49 |
+
gr.outputs.Image(type="filepath", label="Forecasting the VN Index for the next 90 days"),
|
50 |
+
gr.outputs.Textbox(label="Description"),
|
51 |
gr.outputs.Textbox(label="Disclaimer")
|
52 |
]
|
53 |
+
interface = gr.Interface(fn=predict_vn_index, inputs=dropdown, outputs=outputs, title="Forecasting the VN Index for the next 90 days")
|
54 |
interface.launch()
|
55 |
|
56 |
|