tokudai commited on
Commit
b65b394
1 Parent(s): 0f1c17d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -110,17 +110,17 @@ with gr.Blocks() as demo:
110
  # radio = gr.Radio(
111
  # ["Conversational Question Answering", "Chitchat", "Grounded Response Generation"], label="Instruction Type", value='Conversational Question Answering'
112
  # )
113
- # radio = gr.Radio(
114
- # ["Conversational Question Answering"], label="Instruction Type", value='Conversational Question Answering'
115
- # )
116
- # instruction = gr.Textbox(lines=1, interactive=True, label="Instruction",
117
- # value="Instruction: given a dialog context and related knowledge, you need to answer the question based on the knowledge.")
118
- instruction = "Instruction: given a dialog context and related knowledge, you need to answer the question based on the knowledge."
119
- # radio.change(fn=change_textbox, inputs=radio, outputs=instruction)
120
  knowledge = gr.Textbox(lines=6, label="Knowledge")
121
  query = gr.Textbox(lines=1, label="User Query")
122
 
123
- # dropdown.change(change_example, dropdown, [instruction, knowledge, query, radio])
124
 
125
  with gr.Row():
126
  with gr.Column(scale=1):
 
110
  # radio = gr.Radio(
111
  # ["Conversational Question Answering", "Chitchat", "Grounded Response Generation"], label="Instruction Type", value='Conversational Question Answering'
112
  # )
113
+ radio = gr.Radio(
114
+ ["Conversational Question Answering"], label="Instruction Type", value='Conversational Question Answering'
115
+ )
116
+ instruction = gr.Textbox(lines=1, interactive=True, label="Instruction",
117
+ value="Instruction: given a dialog context and related knowledge, you need to answer the question based on the knowledge.")
118
+ # instruction = "Instruction: given a dialog context and related knowledge, you need to answer the question based on the knowledge."
119
+ radio.change(fn=change_textbox, inputs=radio, outputs=instruction)
120
  knowledge = gr.Textbox(lines=6, label="Knowledge")
121
  query = gr.Textbox(lines=1, label="User Query")
122
 
123
+ dropdown.change(change_example, dropdown, [instruction, knowledge, query, radio])
124
 
125
  with gr.Row():
126
  with gr.Column(scale=1):