Spaces:
Sleeping
Sleeping
Update my_model/tabs/results.py
Browse files- my_model/tabs/results.py +1 -10
my_model/tabs/results.py
CHANGED
|
@@ -10,13 +10,10 @@ def run_demo():
|
|
| 10 |
layout="wide",
|
| 11 |
initial_sidebar_state="expanded")
|
| 12 |
demo = ResultDemonstrator() # Instantiate the ResultDemonstrator class
|
| 13 |
-
|
| 14 |
col1, col2 = st.columns([1, 4])
|
| 15 |
-
|
| 16 |
with col1:
|
| 17 |
# User selects the evaluation analysis aspect
|
| 18 |
section_type = st.radio("Select Evaluation Aspect", ["Evaluation Results & Analysis", 'Evaluation Samples'])
|
| 19 |
-
|
| 20 |
# Only show analysis type if the section type is "Evaluation Results & Analysis"
|
| 21 |
if section_type == "Evaluation Results & Analysis":
|
| 22 |
analysis_type = st.radio("Select Type", ["Main & Ablation Results", "Results per Question Category",
|
|
@@ -25,24 +22,18 @@ def run_demo():
|
|
| 25 |
# Based on the selection, other options appear
|
| 26 |
model_name = st.radio("Select Model Size", config.MODEL_NAMES)
|
| 27 |
score_name = st.radio("Select Score Type", ["VQA Score", "Exact Match"])
|
| 28 |
-
|
| 29 |
elif section_type == 'Evaluation Samples':
|
| 30 |
samples_button = st.button("Generate Random Samples")
|
| 31 |
-
|
| 32 |
with col2:
|
| 33 |
if section_type == "Evaluation Results & Analysis":
|
| 34 |
if analysis_type == "Prompt Length (token count) Impact on Performance":
|
| 35 |
for conf in config.MODEL_CONFIGURATIONS:
|
| 36 |
with st.expander(conf):
|
| 37 |
demo.plot_token_count_vs_scores(conf, model_name, score_name)
|
| 38 |
-
|
| 39 |
elif analysis_type == "Main & Ablation Results":
|
| 40 |
demo.display_main_results()
|
| 41 |
-
|
| 42 |
elif analysis_type == "Results per Question Category":
|
| 43 |
demo.display_ablation_results_per_question_category()
|
| 44 |
-
|
| 45 |
elif section_type == 'Evaluation Samples':
|
| 46 |
if samples_button:
|
| 47 |
-
demo.show_samples(3)
|
| 48 |
-
|
|
|
|
| 10 |
layout="wide",
|
| 11 |
initial_sidebar_state="expanded")
|
| 12 |
demo = ResultDemonstrator() # Instantiate the ResultDemonstrator class
|
|
|
|
| 13 |
col1, col2 = st.columns([1, 4])
|
|
|
|
| 14 |
with col1:
|
| 15 |
# User selects the evaluation analysis aspect
|
| 16 |
section_type = st.radio("Select Evaluation Aspect", ["Evaluation Results & Analysis", 'Evaluation Samples'])
|
|
|
|
| 17 |
# Only show analysis type if the section type is "Evaluation Results & Analysis"
|
| 18 |
if section_type == "Evaluation Results & Analysis":
|
| 19 |
analysis_type = st.radio("Select Type", ["Main & Ablation Results", "Results per Question Category",
|
|
|
|
| 22 |
# Based on the selection, other options appear
|
| 23 |
model_name = st.radio("Select Model Size", config.MODEL_NAMES)
|
| 24 |
score_name = st.radio("Select Score Type", ["VQA Score", "Exact Match"])
|
|
|
|
| 25 |
elif section_type == 'Evaluation Samples':
|
| 26 |
samples_button = st.button("Generate Random Samples")
|
|
|
|
| 27 |
with col2:
|
| 28 |
if section_type == "Evaluation Results & Analysis":
|
| 29 |
if analysis_type == "Prompt Length (token count) Impact on Performance":
|
| 30 |
for conf in config.MODEL_CONFIGURATIONS:
|
| 31 |
with st.expander(conf):
|
| 32 |
demo.plot_token_count_vs_scores(conf, model_name, score_name)
|
|
|
|
| 33 |
elif analysis_type == "Main & Ablation Results":
|
| 34 |
demo.display_main_results()
|
|
|
|
| 35 |
elif analysis_type == "Results per Question Category":
|
| 36 |
demo.display_ablation_results_per_question_category()
|
|
|
|
| 37 |
elif section_type == 'Evaluation Samples':
|
| 38 |
if samples_button:
|
| 39 |
+
demo.show_samples(3)
|
|
|