updating code
Browse files
app.py
CHANGED
@@ -244,28 +244,17 @@ from gradio import inputs # Import the missing 'inputs' attribute from the 'gra
|
|
244 |
api_key_link = "https://www.alphavantage.co/support/#api-key"
|
245 |
|
246 |
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
fn=run_backtest,
|
262 |
-
inputs=[
|
263 |
-
APIKeyComponent(),
|
264 |
-
CurrencyPairComponent(),
|
265 |
-
gr.inputs.Radio(label="Interval", choices=["1min", "5min", "15min", "30min", "60min"])
|
266 |
-
],
|
267 |
-
outputs="html", # Output as HTML to display colored text
|
268 |
-
live=True,
|
269 |
-
title="Trading Signal",
|
270 |
-
description="Run Backtest and Get Trading Signal",
|
271 |
-
).launch()
|
|
|
244 |
api_key_link = "https://www.alphavantage.co/support/#api-key"
|
245 |
|
246 |
|
247 |
+
# Create a Gradio interface
|
248 |
+
gr.Interface(
|
249 |
+
fn=run_backtest,
|
250 |
+
inputs=[
|
251 |
+
gr.inputs.Textbox(label="API Key", placeholder="Enter your API key"),
|
252 |
+
gr.inputs.Dropdown(label="From Currency", choices=['EUR', 'GBP', 'USD', 'AUD', 'JPY']),
|
253 |
+
gr.inputs.Dropdown(label="To Currency", choices=['USD', 'JPY', 'GBP', 'AUD', 'CAD']),
|
254 |
+
gr.inputs.Radio(label="Interval", choices=["1min", "5min", "15min", "30min", "60min"])
|
255 |
+
],
|
256 |
+
outputs="html", # Output as HTML to display colored text
|
257 |
+
live=True,
|
258 |
+
title="Trading Signal",
|
259 |
+
description="Run Backtest and Get Trading Signal",
|
260 |
+
).launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|