Reality123b commited on
Commit
6f04329
·
verified ·
1 Parent(s): 9d98a6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -105,9 +105,9 @@ def predict_next_day(symbol, timeframe):
105
 
106
  def plot_candlestick(data, symbol, timeframe, predicted_price=None):
107
  """Plots the candlestick chart with technical indicators."""
108
- if not isinstance(data, pd.DataFrame) or data.empty:
109
  raise ValueError("No valid data to plot. Please check your inputs.")
110
-
111
  fig, ax = plt.subplots(figsize=(12, 6))
112
  mpf.plot(data, type='candle', style='charles', ax=ax, volume=True, show_nontrading=True)
113
 
@@ -126,6 +126,7 @@ def plot_candlestick(data, symbol, timeframe, predicted_price=None):
126
  fig.tight_layout()
127
  return fig
128
 
 
129
  def main():
130
  """Gradio Interface."""
131
 
 
105
 
106
  def plot_candlestick(data, symbol, timeframe, predicted_price=None):
107
  """Plots the candlestick chart with technical indicators."""
108
+ if data.empty:
109
  raise ValueError("No valid data to plot. Please check your inputs.")
110
+
111
  fig, ax = plt.subplots(figsize=(12, 6))
112
  mpf.plot(data, type='candle', style='charles', ax=ax, volume=True, show_nontrading=True)
113
 
 
126
  fig.tight_layout()
127
  return fig
128
 
129
+
130
  def main():
131
  """Gradio Interface."""
132