adpro commited on
Commit
4423f21
·
verified ·
1 Parent(s): 09acea3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -165,7 +165,7 @@ with gr.Blocks() as app:
165
  end = gr.Text(label="End (YYYY-MM-DD)")
166
  out = gr.JSON(label="Result")
167
  btn = gr.Button("Get History")
168
- btn.click(api_history, [sym, start, end], out, api_name="api_history")
169
 
170
  with gr.Tab("Technical Analysis API"):
171
  sym2 = gr.Text(label="Symbol")
@@ -173,14 +173,14 @@ with gr.Blocks() as app:
173
  end2 = gr.Text(label="End (YYYY-MM-DD)")
174
  out2 = gr.JSON(label="Result")
175
  btn2 = gr.Button("Get Indicators")
176
- btn2.click(api_ta, [sym2, start2, end2], out2, api_name="api_ta")
177
 
178
  with gr.Tab("GNN Prediction API"):
179
  sym3 = gr.Text(label="Symbol")
180
  days3 = gr.Number(label="Days to Predict", value=7)
181
  out3 = gr.JSON(label="Result")
182
  btn3 = gr.Button("Predict GNN")
183
- btn3.click(api_gnn, [sym3, days3], out3, api_name="api_gnn")
184
 
185
  # 🚀 RUN ON HUGGINGFACE — KHÔNG share=True
186
  app.launch()
 
165
  end = gr.Text(label="End (YYYY-MM-DD)")
166
  out = gr.JSON(label="Result")
167
  btn = gr.Button("Get History")
168
+ btn.click(api_history, [sym, start, end], out).api_name = "api_history"
169
 
170
  with gr.Tab("Technical Analysis API"):
171
  sym2 = gr.Text(label="Symbol")
 
173
  end2 = gr.Text(label="End (YYYY-MM-DD)")
174
  out2 = gr.JSON(label="Result")
175
  btn2 = gr.Button("Get Indicators")
176
+ btn2.click(api_ta, [sym2, start2, end2], out2).api_name = "api_ta"
177
 
178
  with gr.Tab("GNN Prediction API"):
179
  sym3 = gr.Text(label="Symbol")
180
  days3 = gr.Number(label="Days to Predict", value=7)
181
  out3 = gr.JSON(label="Result")
182
  btn3 = gr.Button("Predict GNN")
183
+ btn3.click(api_gnn, [sym3, days3], out3).api_name = "api_gnn"
184
 
185
  # 🚀 RUN ON HUGGINGFACE — KHÔNG share=True
186
  app.launch()