up
Browse files
app.py
CHANGED
|
@@ -5,6 +5,7 @@
|
|
| 5 |
Automatically generated by Colab.
|
| 6 |
|
| 7 |
Original file is located at
|
|
|
|
| 8 |
https://colab.research.google.com/drive/1fuCvRJdvsG0unIYY6-RQ6zNjKwRxIAes
|
| 9 |
|
| 10 |
"""
|
|
@@ -794,20 +795,19 @@ def plot_for_user(stock_name, future_days):
|
|
| 794 |
|
| 795 |
|
| 796 |
def combined_function(date, money):
|
| 797 |
-
|
| 798 |
-
|
|
|
|
|
|
|
|
|
|
| 799 |
if money <= 0:
|
| 800 |
-
|
| 801 |
-
|
|
|
|
| 802 |
if best_stock:
|
| 803 |
plot = plot_for_user(best_stock,date)
|
| 804 |
return best_prediction, plot
|
| 805 |
else:
|
| 806 |
-
img = plt.imread('haga.jpeg')
|
| 807 |
-
plt.imshow(img)
|
| 808 |
-
plt.axis('off')
|
| 809 |
-
im = plt.gcf()
|
| 810 |
-
plt.close(im)
|
| 811 |
return best_prediction, im
|
| 812 |
|
| 813 |
|
|
|
|
| 5 |
Automatically generated by Colab.
|
| 6 |
|
| 7 |
Original file is located at
|
| 8 |
+
|
| 9 |
https://colab.research.google.com/drive/1fuCvRJdvsG0unIYY6-RQ6zNjKwRxIAes
|
| 10 |
|
| 11 |
"""
|
|
|
|
| 795 |
|
| 796 |
|
| 797 |
def combined_function(date, money):
|
| 798 |
+
img = plt.imread('haga.jpeg')
|
| 799 |
+
plt.imshow(img)
|
| 800 |
+
plt.axis('off')
|
| 801 |
+
im = plt.gcf()
|
| 802 |
+
plt.close(im)
|
| 803 |
if money <= 0:
|
| 804 |
+
return "Budget must be greater than 0", im
|
| 805 |
+
|
| 806 |
+
best_stock, best_prediction = compare_models(date, money)
|
| 807 |
if best_stock:
|
| 808 |
plot = plot_for_user(best_stock,date)
|
| 809 |
return best_prediction, plot
|
| 810 |
else:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 811 |
return best_prediction, im
|
| 812 |
|
| 813 |
|