Spaces:
Runtime error
Runtime error
Commit
·
9d87ac1
1
Parent(s):
018c0e7
testing visibility of api key
Browse files
app.py
CHANGED
@@ -243,7 +243,7 @@ def interface():
|
|
243 |
# Inputs
|
244 |
task_prompt = gr.Textbox(show_label=False, placeholder="Write a prompt and press enter")
|
245 |
with gr.Row():
|
246 |
-
have_key = gr.Dropdown(["Yes", "No"], label="Do you own an API Key?", scale=
|
247 |
task_apikey_input = gr.Textbox(label="Open AI Key", placeholder="Enter your OpenAI key here", type="password", visible=False)
|
248 |
task = gr.Dropdown(["POS Tagging", "Chunking"], label="Task")
|
249 |
task_linguistic_entities = gr.Dropdown(["Noun", "Determiner", "Noun phrase", "Verb phrase", "Dependent clause", "T-units"], label="Linguistic Entity For Strategy 1")
|
@@ -280,7 +280,7 @@ def interface():
|
|
280 |
else:
|
281 |
task_apikey_input.visible = False
|
282 |
|
283 |
-
have_key.change(toggle_api_key_input, inputs=have_key)
|
284 |
task_apikey_input.change(update_api_key, inputs=task_apikey_input)
|
285 |
|
286 |
# vicuna_strategies_respond(strategy, task_name, task_ling_ent, message, chat_history):
|
|
|
243 |
# Inputs
|
244 |
task_prompt = gr.Textbox(show_label=False, placeholder="Write a prompt and press enter")
|
245 |
with gr.Row():
|
246 |
+
have_key = gr.Dropdown(["Yes", "No"], label="Do you own an API Key?", scale=0)
|
247 |
task_apikey_input = gr.Textbox(label="Open AI Key", placeholder="Enter your OpenAI key here", type="password", visible=False)
|
248 |
task = gr.Dropdown(["POS Tagging", "Chunking"], label="Task")
|
249 |
task_linguistic_entities = gr.Dropdown(["Noun", "Determiner", "Noun phrase", "Verb phrase", "Dependent clause", "T-units"], label="Linguistic Entity For Strategy 1")
|
|
|
280 |
else:
|
281 |
task_apikey_input.visible = False
|
282 |
|
283 |
+
have_key.change(toggle_api_key_input, inputs=have_key.value)
|
284 |
task_apikey_input.change(update_api_key, inputs=task_apikey_input)
|
285 |
|
286 |
# vicuna_strategies_respond(strategy, task_name, task_ling_ent, message, chat_history):
|