ShawnRu commited on
Commit
283ac11
Β·
verified Β·
1 Parent(s): 14c39ae

Update src/webui.py

Browse files
Files changed (1) hide show
  1. src/webui.py +3 -3
src/webui.py CHANGED
@@ -151,7 +151,7 @@ def create_interface():
151
 
152
  update_case_gr = gr.Checkbox(label="πŸ’° Update Case", value=False)
153
  # update_schema_gr = gr.Checkbox(label="πŸ“Ÿ Update Schema", value=False)
154
- truth_gr = gr.Textbox(label="πŸͺ™ Truth", lines=2, placeholder="""You can enter the truth you want LLM know, for example: {"relation_list": [{"head": "Guinea", "tail": "Conakry", "relation": "country capital"}]}""", visible=False)
155
  # selfschema_gr = gr.Textbox(label="πŸ“Ÿ Schema", lines=5, placeholder="Enter your New Schema", visible=False, interactive=True)
156
 
157
  def get_model_category(model_name_or_path):
@@ -179,7 +179,7 @@ def create_interface():
179
  def update_fields(task):
180
  if task == "Base" or task == "":
181
  return gr.update(visible=True, label="πŸ•ΉοΈ Instruction", lines=3,
182
- placeholder="You can enter any type of information you want to extract here, for example: Please help me extract all the person names."), gr.update(visible=False)
183
  elif task == "NER":
184
  return gr.update(visible=False), gr.update(visible=True, label="πŸ•ΉοΈ Constraint", lines=3,
185
  placeholder="Please specify the entity types to extract in list format, and all types will be extracted by default if not specified.")
@@ -405,4 +405,4 @@ def create_interface():
405
  # Launch the front-end interface
406
  if __name__ == "__main__":
407
  interface = create_interface()
408
- interface.launch()
 
151
 
152
  update_case_gr = gr.Checkbox(label="πŸ’° Update Case", value=False)
153
  # update_schema_gr = gr.Checkbox(label="πŸ“Ÿ Update Schema", value=False)
154
+ truth_gr = gr.Textbox(label="πŸͺ™ Truth", lines=2, placeholder="""Please enter the truth you want LLM know, for example: {"relation_list": [{"head": "Guinea", "tail": "Conakry", "relation": "country capital"}]}""", visible=False)
155
  # selfschema_gr = gr.Textbox(label="πŸ“Ÿ Schema", lines=5, placeholder="Enter your New Schema", visible=False, interactive=True)
156
 
157
  def get_model_category(model_name_or_path):
 
179
  def update_fields(task):
180
  if task == "Base" or task == "":
181
  return gr.update(visible=True, label="πŸ•ΉοΈ Instruction", lines=3,
182
+ placeholder="Please enter any type of information you want to extract here, for example: Please help me extract all the person names."), gr.update(visible=False)
183
  elif task == "NER":
184
  return gr.update(visible=False), gr.update(visible=True, label="πŸ•ΉοΈ Constraint", lines=3,
185
  placeholder="Please specify the entity types to extract in list format, and all types will be extracted by default if not specified.")
 
405
  # Launch the front-end interface
406
  if __name__ == "__main__":
407
  interface = create_interface()
408
+ interface.launch() # the Gradio defalut URL usually is: 127.0.0.1:7860