Spaces:
Running
Running
๐ textbox UI p2
Browse filesSigned-off-by: peter szemraj <peterszemraj@gmail.com>
app.py
CHANGED
@@ -184,7 +184,7 @@ def proc_submission(
|
|
184 |
token_batch_length=token_batch_length,
|
185 |
**settings,
|
186 |
)
|
187 |
-
sum_text = [s["summary"][0].strip() + "\n" for
|
188 |
sum_scores = [
|
189 |
f" - Batch Summary {i}: {round(s['summary_score'],4)}"
|
190 |
for i, s in enumerate(_summaries)
|
@@ -365,20 +365,21 @@ if __name__ == "__main__":
|
|
365 |
with gr.Column():
|
366 |
gr.Markdown("Export & Summary Scores")
|
367 |
with gr.Row(variant="panel"):
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
gr.
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
|
|
382 |
|
383 |
gr.Markdown("---")
|
384 |
with gr.Column():
|
|
|
184 |
token_batch_length=token_batch_length,
|
185 |
**settings,
|
186 |
)
|
187 |
+
sum_text = [s["summary"][0].strip() + "\n" for s in _summaries]
|
188 |
sum_scores = [
|
189 |
f" - Batch Summary {i}: {round(s['summary_score'],4)}"
|
190 |
for i, s in enumerate(_summaries)
|
|
|
365 |
with gr.Column():
|
366 |
gr.Markdown("Export & Summary Scores")
|
367 |
with gr.Row(variant="panel"):
|
368 |
+
with gr.Column(variant="compact"):
|
369 |
+
text_file = gr.File(
|
370 |
+
label="Download as Text File",
|
371 |
+
file_count="single",
|
372 |
+
type="file",
|
373 |
+
interactive=False,
|
374 |
+
)
|
375 |
+
with gr.Column(variant="compact"):
|
376 |
+
gr.Markdown(
|
377 |
+
"The summary scores can be thought of as representing the quality of the summary. less-negative numbers (closer to 0) are better:"
|
378 |
+
)
|
379 |
+
summary_scores = gr.Textbox(
|
380 |
+
label="Summary Scores",
|
381 |
+
placeholder="Summary scores will appear here",
|
382 |
+
)
|
383 |
|
384 |
gr.Markdown("---")
|
385 |
with gr.Column():
|
utils.py
CHANGED
@@ -114,10 +114,6 @@ def textlist2html(text_batches):
|
|
114 |
font-size: 18px;
|
115 |
line-height: 1.5em;
|
116 |
color: #333;
|
117 |
-
background-color: #f9f9f9;
|
118 |
-
border: 1px solid #ddd;
|
119 |
-
border-radius: 5px;
|
120 |
-
padding: 20px;
|
121 |
">
|
122 |
<h2 style="font-size: 22px; color: #555;">Batch {i}:</h2>
|
123 |
<p style="white-space: pre-line;">{s}</p>
|
|
|
114 |
font-size: 18px;
|
115 |
line-height: 1.5em;
|
116 |
color: #333;
|
|
|
|
|
|
|
|
|
117 |
">
|
118 |
<h2 style="font-size: 22px; color: #555;">Batch {i}:</h2>
|
119 |
<p style="white-space: pre-line;">{s}</p>
|