pszemraj commited on
Commit
15c9486
β€’
1 Parent(s): c430753

πŸ’„ textbox UI p2

Browse files

Signed-off-by: peter szemraj <[email protected]>

Files changed (2) hide show
  1. app.py +16 -15
  2. utils.py +0 -4
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 i, s in _summaries]
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
- text_file = gr.File(
369
- label="Download as Text File",
370
- file_count="single",
371
- type="file",
372
- interactive=False,
373
- )
374
- with gr.Row(variant="panel"):
375
- gr.Markdown(
376
- "The summary scores can be thought of as representing the quality of the summary. less-negative numbers (closer to 0) are better:"
377
- )
378
- summary_scores = gr.Textbox(
379
- label="Summary Scores",
380
- placeholder="Summary scores will appear here",
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>