Upload folder using huggingface_hub
Browse files- app/draw_diagram.py +10 -9
- app/show_examples.py +10 -8
app/draw_diagram.py
CHANGED
|
@@ -97,16 +97,17 @@ def draw(folder_name, category_name, dataset_name, metrics):
|
|
| 97 |
Show table
|
| 98 |
'''
|
| 99 |
# st.divider()
|
| 100 |
-
|
|
|
|
| 101 |
# chart_data['Link'] = chart_data['Model'].map(links_dic)
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
'''
|
| 111 |
show samples
|
| 112 |
'''
|
|
|
|
| 97 |
Show table
|
| 98 |
'''
|
| 99 |
# st.divider()
|
| 100 |
+
st.write("")
|
| 101 |
+
st.markdown('##### TABLE')
|
| 102 |
# chart_data['Link'] = chart_data['Model'].map(links_dic)
|
| 103 |
+
st.dataframe(chart_data,
|
| 104 |
+
# column_config = {
|
| 105 |
+
# "Link": st.column_config.LinkColumn(
|
| 106 |
+
# display_text= st.image(huggingface_image)
|
| 107 |
+
# ),
|
| 108 |
+
# },
|
| 109 |
+
hide_index = True,
|
| 110 |
+
use_container_width=True)
|
| 111 |
'''
|
| 112 |
show samples
|
| 113 |
'''
|
app/show_examples.py
CHANGED
|
@@ -8,13 +8,13 @@ def show_examples(category_name, dataset_name, model_lists):
|
|
| 8 |
dataset = datasets.load_from_disk(sample_folder)
|
| 9 |
|
| 10 |
for index in range(len(dataset)):
|
| 11 |
-
|
| 12 |
-
|
| 13 |
col1, col2 = st.columns([0.3, 0.7], vertical_alignment="center")
|
| 14 |
|
| 15 |
with col1:
|
| 16 |
st.audio(f'{sample_folder}/sample_{index}.wav', format="audio/wav")
|
| 17 |
-
|
| 18 |
with col2:
|
| 19 |
with st.container():
|
| 20 |
custom_css = """
|
|
@@ -38,10 +38,10 @@ def show_examples(category_name, dataset_name, model_lists):
|
|
| 38 |
choices_text = ' '.join(i for i in choices)
|
| 39 |
|
| 40 |
question_text = f"""<div class="my-container-question">
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
else:
|
| 46 |
question_text = f"""<div class="my-container-question">
|
| 47 |
<p>QUESTION: {dataset[index]['instruction']['text']}</p>
|
|
@@ -67,7 +67,7 @@ def show_examples(category_name, dataset_name, model_lists):
|
|
| 67 |
</div>""", unsafe_allow_html=True)
|
| 68 |
|
| 69 |
|
| 70 |
-
st.divider()
|
| 71 |
with st.container():
|
| 72 |
custom_css = """
|
| 73 |
<style>
|
|
@@ -123,6 +123,8 @@ def show_examples(category_name, dataset_name, model_lists):
|
|
| 123 |
</div>""", unsafe_allow_html=True)
|
| 124 |
|
| 125 |
st.text("")
|
|
|
|
|
|
|
| 126 |
|
| 127 |
|
| 128 |
|
|
|
|
| 8 |
dataset = datasets.load_from_disk(sample_folder)
|
| 9 |
|
| 10 |
for index in range(len(dataset)):
|
| 11 |
+
with st.container():
|
| 12 |
+
st.markdown(f'##### EXAMPLE {index+1}')
|
| 13 |
col1, col2 = st.columns([0.3, 0.7], vertical_alignment="center")
|
| 14 |
|
| 15 |
with col1:
|
| 16 |
st.audio(f'{sample_folder}/sample_{index}.wav', format="audio/wav")
|
| 17 |
+
|
| 18 |
with col2:
|
| 19 |
with st.container():
|
| 20 |
custom_css = """
|
|
|
|
| 38 |
choices_text = ' '.join(i for i in choices)
|
| 39 |
|
| 40 |
question_text = f"""<div class="my-container-question">
|
| 41 |
+
<p>QUESTION: {dataset[index]['instruction']['text']}</p>
|
| 42 |
+
<p>CHOICES: {choices_text}</p>
|
| 43 |
+
</div>
|
| 44 |
+
"""
|
| 45 |
else:
|
| 46 |
question_text = f"""<div class="my-container-question">
|
| 47 |
<p>QUESTION: {dataset[index]['instruction']['text']}</p>
|
|
|
|
| 67 |
</div>""", unsafe_allow_html=True)
|
| 68 |
|
| 69 |
|
| 70 |
+
# st.divider()
|
| 71 |
with st.container():
|
| 72 |
custom_css = """
|
| 73 |
<style>
|
|
|
|
| 123 |
</div>""", unsafe_allow_html=True)
|
| 124 |
|
| 125 |
st.text("")
|
| 126 |
+
|
| 127 |
+
st.divider()
|
| 128 |
|
| 129 |
|
| 130 |
|