Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -95,14 +95,14 @@ with gr.Blocks() as demo:
|
|
95 |
# T4.5 Relevance Classifier Demo
|
96 |
This is a demo created to explore floods and wildfire classification in social media posts.\n
|
97 |
Usage:\n
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
Evaluation:\n
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
""")
|
107 |
with gr.Row(equal_height=True):
|
108 |
with gr.Column(scale=4):
|
@@ -167,7 +167,15 @@ with gr.Blocks() as demo:
|
|
167 |
|
168 |
with qa_tab:
|
169 |
# XXX Add some button disabling here, if the classification process is not completed first XXX
|
170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
selected_queries = gr.CheckboxGroup(label="Select at least one query using the checkboxes", interactive=True)
|
172 |
qa_tab.select(get_queries, None, selected_queries)
|
173 |
qa_button = gr.Button("Start QA")
|
|
|
95 |
# T4.5 Relevance Classifier Demo
|
96 |
This is a demo created to explore floods and wildfire classification in social media posts.\n
|
97 |
Usage:\n
|
98 |
+
- Upload .tsv data file (must contain a text column with social media posts).\n
|
99 |
+
- Next, type the name of the text column.\n
|
100 |
+
- Then, choose a BERT classifier model from the drop down.\n
|
101 |
+
- Finally, click the 'start prediction' buttton.\n
|
102 |
Evaluation:\n
|
103 |
+
- To evaluate the model's accuracy select the INCORRECT classifications using the checkboxes in front of each post.\n
|
104 |
+
- Then, click on the 'Calculate Accuracy' button.\n
|
105 |
+
- Then, click on the 'Download data as CSV' to get the classifications and evaluation data as a .csv file.
|
106 |
""")
|
107 |
with gr.Row(equal_height=True):
|
108 |
with gr.Column(scale=4):
|
|
|
167 |
|
168 |
with qa_tab:
|
169 |
# XXX Add some button disabling here, if the classification process is not completed first XXX
|
170 |
+
|
171 |
+
gr.Markdown(
|
172 |
+
"""
|
173 |
+
# Question Answering Demo
|
174 |
+
This section uses RAG to answer questions about the relevant social media posts identified by the relevance classifier\n
|
175 |
+
Usage:\n
|
176 |
+
- Select queries from predefined\n
|
177 |
+
- Parameters for QA can be editted in sidebar\n
|
178 |
+
""")
|
179 |
selected_queries = gr.CheckboxGroup(label="Select at least one query using the checkboxes", interactive=True)
|
180 |
qa_tab.select(get_queries, None, selected_queries)
|
181 |
qa_button = gr.Button("Start QA")
|