roncmic commited on
Commit
d723c8a
·
verified ·
1 Parent(s): 387d137

Update app_pyvis_new.py

Browse files
Files changed (1) hide show
  1. app_pyvis_new.py +28 -3
app_pyvis_new.py CHANGED
@@ -712,8 +712,31 @@ def build_interface():
712
 
713
  # New Radio button for user feedback
714
  feedback_radio = gr.Radio(
715
- choices=["Yes", "No"],
716
- label="According to your expert knowledge, does the graph capture the main relations?",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
717
  interactive=True
718
  )
719
 
@@ -759,7 +782,9 @@ def build_interface():
759
  save_button.click(
760
  fn=save_data,
761
  inputs=[row_dropdown, feedback_radio],
762
- outputs=[]
 
 
763
  )
764
 
765
  # Handle processing of the new node
 
712
 
713
  # New Radio button for user feedback
714
  feedback_radio = gr.Radio(
715
+ choices=[
716
+ "Fully Correct",
717
+ "Mostly Correct",
718
+ "Partially Incorrect",
719
+ "Incorrect",
720
+ "Difficult to Judge"
721
+ ],
722
+ label="According to your expert knowledge, evaluate the graph based on the following descriptions:",
723
+ interactive=True
724
+ )
725
+
726
+ # Add descriptions for each option
727
+ gr.Markdown("""
728
+ - **Fully Correct**: All relevant nodes are accurately identified. The relationships among these nodes, including their directions (causes or prevents), are correct.
729
+ - **Mostly Correct**: The majority of relevant nodes are identified. However, some relationships may be missing or incorrect, such as a missing link or an inaccurate parent-child relationship. Despite these minor issues, the overall structure is largely accurate.
730
+ - **Partially Incorrect**: Some important nodes are missing and there are errors in the directions of relationships. However, the graph still captures some of the main characteristics of the intended relationships.
731
+ - **Incorrect**: The majority of links are incorrect, and many relevant nodes are either missing or inaccurately represented.
732
+ - **Difficult to Judge**: The graph is ambiguous or lacks sufficient context for accurate assessment.
733
+ """)
734
+
735
+ # New section for generating new scenarios
736
+ gr.Markdown("### Generate New Scenarios") # Subtitle for the new section
737
+ new_node_input = gr.Textbox(
738
+ label="Enter a new variable or factor that might interact with the current graph to generate a plausible scenario:",
739
+ placeholder="e.g., tornado",
740
  interactive=True
741
  )
742
 
 
782
  save_button.click(
783
  fn=save_data,
784
  inputs=[row_dropdown, feedback_radio],
785
+ outputs=[feedback_message],
786
+ api_name="Save Answer",
787
+ returns="Thank you, your answer has been recorded! This will help make AI more reliable."
788
  )
789
 
790
  # Handle processing of the new node