Update app.py
Browse files
app.py
CHANGED
@@ -168,37 +168,37 @@ def main(args):
|
|
168 |
gr.Markdown("# Adaptive Summarization")
|
169 |
gr.Markdown("AdaptSum stands for Adaptive Summarization. This project focuses on developing an LLM-powered system for dynamic summarization. Instead of generating entirely new summaries with each update, the system intelligently identifies and modifies only the necessary parts of the existing summary. This approach aims to create a more efficient and fluid summarization process within a continuous chat interaction with an LLM.")
|
170 |
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
|
203 |
# with gr.Column("persona-dropdown-container", elem_id="persona-dropdown-container"):
|
204 |
# persona = gr.Dropdown(
|
|
|
168 |
gr.Markdown("# Adaptive Summarization")
|
169 |
gr.Markdown("AdaptSum stands for Adaptive Summarization. This project focuses on developing an LLM-powered system for dynamic summarization. Instead of generating entirely new summaries with each update, the system intelligently identifies and modifies only the necessary parts of the existing summary. This approach aims to create a more efficient and fluid summarization process within a continuous chat interaction with an LLM.")
|
170 |
|
171 |
+
with gr.Column():
|
172 |
+
with gr.Accordion("Adaptively Summarized Conversation", elem_id="adaptive-summary-accordion", open=False):
|
173 |
+
with gr.Row(elem_id="view-toggle-btn-container"):
|
174 |
+
view_toggle_btn = gr.Radio(
|
175 |
+
choices=["Diff", "Markdown"],
|
176 |
+
value="Markdown",
|
177 |
+
interactive=True,
|
178 |
+
elem_id="view-toggle-btn"
|
179 |
+
)
|
180 |
+
|
181 |
+
summary_diff = gr.HighlightedText(
|
182 |
+
label="Summary so far",
|
183 |
+
# value="No summary yet. As you chat with the assistant, the summary will be updated automatically.",
|
184 |
+
combine_adjacent=True,
|
185 |
+
show_legend=True,
|
186 |
+
color_map={"-": "red", "+": "green"},
|
187 |
+
elem_classes=["summary-window"],
|
188 |
+
visible=False
|
189 |
+
)
|
190 |
+
|
191 |
+
summary_md = gr.Markdown(
|
192 |
+
label="Summary so far",
|
193 |
+
value="No summary yet. As you chat with the assistant, the summary will be updated automatically.",
|
194 |
+
elem_classes=["summary-window"],
|
195 |
+
visible=True
|
196 |
+
)
|
197 |
+
|
198 |
+
summary_num = gr.Slider(label="summary history", minimum=1, maximum=1, step=1, show_reset_button=False, visible=False)
|
199 |
+
|
200 |
+
view_toggle_btn.change(change_view_toggle, inputs=[view_toggle_btn], outputs=[summary_diff, summary_md])
|
201 |
+
summary_num.release(navigate_to_summary, inputs=[summary_num, state], outputs=[summary_diff, summary_md])
|
202 |
|
203 |
# with gr.Column("persona-dropdown-container", elem_id="persona-dropdown-container"):
|
204 |
# persona = gr.Dropdown(
|