updating code
Browse files
app.py
CHANGED
@@ -239,6 +239,8 @@ from_currency_choices = ['EUR', 'GBP', 'USD', 'AUD', 'JPY']
|
|
239 |
to_currency_choices = ['USD', 'JPY', 'GBP', 'AUD', 'CAD']
|
240 |
|
241 |
# Placeholder link for API key
|
|
|
|
|
242 |
api_key_link = "https://www.alphavantage.co/support/#api-key"
|
243 |
|
244 |
# Run the Gradio app
|
@@ -247,7 +249,7 @@ if __name__ == "__main__":
|
|
247 |
gr.Interface(
|
248 |
fn=run_backtest,
|
249 |
inputs=[
|
250 |
-
|
251 |
gr.inputs.Dropdown(label="From Currency", choices=from_currency_choices),
|
252 |
gr.inputs.Dropdown(label="To Currency", choices=to_currency_choices),
|
253 |
gr.inputs.Radio(label="Interval", choices=["1min", "5min", "15min", "30min", "60min"])
|
|
|
239 |
to_currency_choices = ['USD', 'JPY', 'GBP', 'AUD', 'CAD']
|
240 |
|
241 |
# Placeholder link for API key
|
242 |
+
from gradio import inputs # Import the missing 'inputs' attribute from the 'gradio' module
|
243 |
+
|
244 |
api_key_link = "https://www.alphavantage.co/support/#api-key"
|
245 |
|
246 |
# Run the Gradio app
|
|
|
249 |
gr.Interface(
|
250 |
fn=run_backtest,
|
251 |
inputs=[
|
252 |
+
inputs.Textbox(label="API Key", type="text", placeholder=api_key_link), # Use the imported 'inputs' attribute
|
253 |
gr.inputs.Dropdown(label="From Currency", choices=from_currency_choices),
|
254 |
gr.inputs.Dropdown(label="To Currency", choices=to_currency_choices),
|
255 |
gr.inputs.Radio(label="Interval", choices=["1min", "5min", "15min", "30min", "60min"])
|