Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,6 +7,22 @@ import io
|
|
| 7 |
|
| 8 |
print("Starting app...")
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
def sma_crossover_strategy(initial_budget, start_date, end_date, ticker):
|
| 11 |
try:
|
| 12 |
df = yf.download(ticker, start=start_date, end=end_date, progress=False)
|
|
|
|
| 7 |
|
| 8 |
print("Starting app...")
|
| 9 |
|
| 10 |
+
try:
|
| 11 |
+
import pandas as pd
|
| 12 |
+
print("Pandas imported.")
|
| 13 |
+
import yfinance as yf
|
| 14 |
+
print("yfinance imported.")
|
| 15 |
+
import numpy as np
|
| 16 |
+
print("NumPy imported.")
|
| 17 |
+
import matplotlib.pyplot as plt
|
| 18 |
+
print("Matplotlib imported.")
|
| 19 |
+
import gradio as gr
|
| 20 |
+
print("Gradio imported.")
|
| 21 |
+
except Exception as e:
|
| 22 |
+
print(f"Error importing libraries: {e}")
|
| 23 |
+
raise
|
| 24 |
+
|
| 25 |
+
|
| 26 |
def sma_crossover_strategy(initial_budget, start_date, end_date, ticker):
|
| 27 |
try:
|
| 28 |
df = yf.download(ticker, start=start_date, end=end_date, progress=False)
|