up
Browse files
app.py
CHANGED
|
@@ -703,7 +703,7 @@ def compare_models(date, money):
|
|
| 703 |
input_data, error = date_to_days(date)
|
| 704 |
if error:
|
| 705 |
return None, error
|
| 706 |
-
if input_data < 0:
|
| 707 |
return None, "The date must be in the future."
|
| 708 |
|
| 709 |
uber_prediction = uber.predict_future(input_data)
|
|
@@ -812,18 +812,7 @@ def combined_function(date, money):
|
|
| 812 |
return best_prediction, im
|
| 813 |
|
| 814 |
|
| 815 |
-
|
| 816 |
-
label="Future Date (YYYY-MM-DD)",
|
| 817 |
-
placeholder="Enter a date in YYYY-MM-DD format",
|
| 818 |
-
lines=1,
|
| 819 |
-
max_lines=1
|
| 820 |
-
)
|
| 821 |
-
|
| 822 |
-
budget_input = gr.Number(
|
| 823 |
-
label="Budget ($)",
|
| 824 |
-
minimum=0,
|
| 825 |
-
step=1
|
| 826 |
-
)
|
| 827 |
|
| 828 |
|
| 829 |
iface = gr.Interface(
|
|
@@ -836,7 +825,9 @@ iface = gr.Interface(
|
|
| 836 |
gr.Textbox(label="Investment Prediction"),
|
| 837 |
gr.Plot(label="Stock Price Graph")
|
| 838 |
],
|
| 839 |
-
title="<span style='color:green;'>Investment Prediction</span>"
|
|
|
|
|
|
|
| 840 |
)
|
| 841 |
|
| 842 |
iface.launch(debug=True)
|
|
|
|
| 703 |
input_data, error = date_to_days(date)
|
| 704 |
if error:
|
| 705 |
return None, error
|
| 706 |
+
if input_data <= 0:
|
| 707 |
return None, "The date must be in the future."
|
| 708 |
|
| 709 |
uber_prediction = uber.predict_future(input_data)
|
|
|
|
| 812 |
return best_prediction, im
|
| 813 |
|
| 814 |
|
| 815 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 816 |
|
| 817 |
|
| 818 |
iface = gr.Interface(
|
|
|
|
| 825 |
gr.Textbox(label="Investment Prediction"),
|
| 826 |
gr.Plot(label="Stock Price Graph")
|
| 827 |
],
|
| 828 |
+
title="<span style='color:green;'>Investment Prediction</span>",
|
| 829 |
+
description="Enter the future date and your budget to find the best stock investment option.",
|
| 830 |
+
theme="compact"
|
| 831 |
)
|
| 832 |
|
| 833 |
iface.launch(debug=True)
|