Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
# app.py
|
| 2 |
-
pip install -r requirements.txt
|
| 3 |
import gradio as gr
|
| 4 |
import pandas as pd
|
| 5 |
import numpy as np
|
|
@@ -45,7 +44,7 @@ def get_technical_analysis(df):
|
|
| 45 |
"SMA_50": df['Close'].rolling(window=50).mean().iloc[-1],
|
| 46 |
"SMA_200": df['Close'].rolling(window=200).mean().iloc[-1],
|
| 47 |
"RSI": df['momentum_rsi'].iloc[-1],
|
| 48 |
-
"MACD": df['
|
| 49 |
}
|
| 50 |
return analysis
|
| 51 |
|
|
|
|
| 1 |
# app.py
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
import pandas as pd
|
| 4 |
import numpy as np
|
|
|
|
| 44 |
"SMA_50": df['Close'].rolling(window=50).mean().iloc[-1],
|
| 45 |
"SMA_200": df['Close'].rolling(window=200).mean().iloc[-1],
|
| 46 |
"RSI": df['momentum_rsi'].iloc[-1],
|
| 47 |
+
"MACD": df['trend_macd_diff'].iloc[-1], # Updated for `ta` library
|
| 48 |
}
|
| 49 |
return analysis
|
| 50 |
|