shaheerawan3 commited on
Commit
0000bf3
·
verified ·
1 Parent(s): c9a9b1b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -247,7 +247,7 @@ def create_analysis_plots(symbol, days=180, lookback=30):
247
  )
248
  fig.update_layout(
249
  height=1200,
250
- title_text=f"\U0001F4C8 {symbol} Price Analysis Dashboard",
251
  showlegend=True,
252
  template="plotly_dark",
253
  paper_bgcolor='rgba(0,0,0,0)',
@@ -255,7 +255,7 @@ def create_analysis_plots(symbol, days=180, lookback=30):
255
  font=dict(size=12)
256
  )
257
  summary = f"""
258
- ### \U0001F4CA Analysis Summary for {symbol}
259
 
260
  #### Current Market Status
261
  - **Current Price:** ${predictions['current_price']:,.2f}
@@ -275,7 +275,7 @@ def create_analysis_plots(symbol, days=180, lookback=30):
275
 
276
  #### Prediction Confidence
277
  - **Average Confidence:** {np.mean(predictions['confidence']) * 100:,.2f}%
278
- - **Trend Direction:** {'\U0001F53A Upward' if predictions['predicted'][-1] > predictions['actual'][-1] else '\U0001F53B Downward'}
279
 
280
  > *Note: Past performance does not guarantee future results. This analysis is for informational purposes only.*
281
  """
@@ -290,12 +290,12 @@ def create_analysis_plots(symbol, days=180, lookback=30):
290
  y=0.5,
291
  showarrow=False
292
  )
293
- return fig, f"\u26A0\uFE0F Error: {str(e)}"
294
 
295
  def create_interface():
296
  with gr.Blocks(theme=gr.themes.Soft()) as iface:
297
  gr.Markdown("""
298
- # \U0001F680 Advanced Cryptocurrency Price Prediction
299
 
300
  This app uses deep learning to predict cryptocurrency prices and provide comprehensive market analysis.
301
 
@@ -325,7 +325,7 @@ def create_interface():
325
  minimum=7, maximum=60, value=30, step=1,
326
  label="Lookback Period (Days)"
327
  )
328
- submit_btn = gr.Button("\U0001F4CA Generate Analysis", variant="primary")
329
  with gr.Column(scale=2):
330
  plot_output = gr.Plot(label="Analysis Plots")
331
  with gr.Row():
@@ -338,7 +338,7 @@ def create_interface():
338
  return figure, summary, gr.update(visible=False, value="")
339
  except Exception as e:
340
  empty_fig = go.Figure()
341
- error_msg = f"\u26A0\uFE0F Error during analysis: {str(e)}"
342
  return empty_fig, "", gr.update(visible=True, value=error_msg)
343
  submit_btn.click(
344
  fn=handle_analysis,
 
247
  )
248
  fig.update_layout(
249
  height=1200,
250
+ title_text=f"📈 {symbol} Price Analysis Dashboard",
251
  showlegend=True,
252
  template="plotly_dark",
253
  paper_bgcolor='rgba(0,0,0,0)',
 
255
  font=dict(size=12)
256
  )
257
  summary = f"""
258
+ ### 📊 Analysis Summary for {symbol}
259
 
260
  #### Current Market Status
261
  - **Current Price:** ${predictions['current_price']:,.2f}
 
275
 
276
  #### Prediction Confidence
277
  - **Average Confidence:** {np.mean(predictions['confidence']) * 100:,.2f}%
278
+ - **Trend Direction:** {'🔺 Upward' if predictions['predicted'][-1] > predictions['actual'][-1] else '🔻 Downward'}
279
 
280
  > *Note: Past performance does not guarantee future results. This analysis is for informational purposes only.*
281
  """
 
290
  y=0.5,
291
  showarrow=False
292
  )
293
+ return fig, f"⚠️ Error: {str(e)}"
294
 
295
  def create_interface():
296
  with gr.Blocks(theme=gr.themes.Soft()) as iface:
297
  gr.Markdown("""
298
+ # 🚀 Advanced Cryptocurrency Price Prediction
299
 
300
  This app uses deep learning to predict cryptocurrency prices and provide comprehensive market analysis.
301
 
 
325
  minimum=7, maximum=60, value=30, step=1,
326
  label="Lookback Period (Days)"
327
  )
328
+ submit_btn = gr.Button("📊 Generate Analysis", variant="primary")
329
  with gr.Column(scale=2):
330
  plot_output = gr.Plot(label="Analysis Plots")
331
  with gr.Row():
 
338
  return figure, summary, gr.update(visible=False, value="")
339
  except Exception as e:
340
  empty_fig = go.Figure()
341
+ error_msg = f"⚠️ Error during analysis: {str(e)}"
342
  return empty_fig, "", gr.update(visible=True, value=error_msg)
343
  submit_btn.click(
344
  fn=handle_analysis,