KavinduHansaka commited on
Commit
c5421bc
·
verified ·
1 Parent(s): fb3d598

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -13
app.py CHANGED
@@ -1,23 +1,16 @@
1
  import gradio as gr
2
- from fetch_crypto_data import update_dataset
3
 
4
- def update_crypto_data():
5
- try:
6
- result = update_dataset()
7
- return f"✅ Success! {result}"
8
- except Exception as e:
9
- return f"❌ Error: {str(e)}"
10
 
11
- # Create Gradio Interface
12
  interface = gr.Interface(
13
- fn=update_crypto_data,
14
  inputs=[],
15
  outputs="text",
16
- title="Crypto Dataset Updater",
17
- description="Click the button below to fetch the latest cryptocurrency data and update the dataset on Hugging Face.",
18
- live=True
19
  )
20
 
21
- # Run the Gradio App
22
  if __name__ == "__main__":
23
  interface.launch()
 
1
  import gradio as gr
2
+ from trading_bot import predicted_price, decision
3
 
4
+ def trade():
5
+ return f"Predicted Price: ${predicted_price:.2f} | Decision: {decision}"
 
 
 
 
6
 
 
7
  interface = gr.Interface(
8
+ fn=trade,
9
  inputs=[],
10
  outputs="text",
11
+ title="Crypto Trading Bot",
12
+ description="This bot predicts crypto trends and suggests Buy/Sell decisions."
 
13
  )
14
 
 
15
  if __name__ == "__main__":
16
  interface.launch()