Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,15 +5,6 @@ import matplotlib.pyplot as plt
|
|
5 |
import io
|
6 |
import gradio as gr
|
7 |
|
8 |
-
def greet(name):
|
9 |
-
return f"Hello, {name}!"
|
10 |
-
|
11 |
-
app = gr.Interface(fn=greet, inputs="text", outputs="text")
|
12 |
-
|
13 |
-
if __name__ == "__main__":
|
14 |
-
app.launch()
|
15 |
-
|
16 |
-
|
17 |
def sma_crossover_strategy(initial_budget, start_date, end_date, ticker):
|
18 |
try:
|
19 |
df = yf.download(ticker, start=start_date, end=end_date, progress=False)
|
@@ -102,5 +93,7 @@ with gr.Blocks() as app:
|
|
102 |
outputs=[portfolio_graph, summary_text],
|
103 |
)
|
104 |
|
105 |
-
app.launch()
|
|
|
|
|
106 |
|
|
|
5 |
import io
|
6 |
import gradio as gr
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
def sma_crossover_strategy(initial_budget, start_date, end_date, ticker):
|
9 |
try:
|
10 |
df = yf.download(ticker, start=start_date, end=end_date, progress=False)
|
|
|
93 |
outputs=[portfolio_graph, summary_text],
|
94 |
)
|
95 |
|
96 |
+
# Ensure only one app.launch() is called
|
97 |
+
if __name__ == "__main__":
|
98 |
+
app.launch()
|
99 |
|