MeetJivani commited on
Commit
bf1e493
1 Parent(s): 18f4b70

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -9
app.py CHANGED
@@ -61,13 +61,23 @@ nltk.download("punkt", force=True, quiet=True)
61
  nltk.download("popular", force=True, quiet=True)
62
 
63
  # Constants & Globals
64
- MODEL_OPTIONS = [
65
- "pszemraj/long-t5-tglobal-base-16384-book-summary",
66
- "pszemraj/long-t5-tglobal-base-sci-simplify",
67
- "pszemraj/long-t5-tglobal-base-sci-simplify-elife",
68
- "pszemraj/long-t5-tglobal-base-16384-booksci-summary-v1",
69
- "pszemraj/pegasus-x-large-book-summary",
70
- ] # models users can choose from
 
 
 
 
 
 
 
 
 
 
71
  BEAM_OPTIONS = [2, 3, 4] # beam sizes users can choose from
72
  TOKEN_BATCH_OPTIONS = [
73
  1024,
@@ -565,9 +575,14 @@ if __name__ == "__main__":
565
  # )
566
  # load_file_button = gr.Button("Upload & Process File")
567
  with gr.Column(variant="compact"):
 
 
 
 
 
568
  model_name = gr.Dropdown(
569
- choices=MODEL_OPTIONS,
570
- value=MODEL_OPTIONS[0],
571
  label="Model Name",
572
  )
573
  # example_name = gr.Dropdown(
 
61
  nltk.download("popular", force=True, quiet=True)
62
 
63
  # Constants & Globals
64
+ # MODEL_OPTIONS = [
65
+ # "pszemraj/long-t5-tglobal-base-16384-book-summary",
66
+ # "pszemraj/long-t5-tglobal-base-sci-simplify",
67
+ # "pszemraj/long-t5-tglobal-base-sci-simplify-elife",
68
+ # "pszemraj/long-t5-tglobal-base-16384-booksci-summary-v1",
69
+ # "pszemraj/pegasus-x-large-book-summary",
70
+ # ] # models users can choose from
71
+ MODEL_OPTIONS = {
72
+ "Model 1": "pszemraj/long-t5-tglobal-base-16384-book-summary",
73
+ "Model 2": "pszemraj/long-t5-tglobal-base-sci-simplify",
74
+ "Model 3": "pszemraj/long-t5-tglobal-base-sci-simplify-elife",
75
+ "Model 4": "pszemraj/long-t5-tglobal-base-16384-booksci-summary-v1",
76
+ "Model 5": "pszemraj/pegasus-x-large-book-summary",
77
+ }
78
+
79
+ model_names = list(MODEL_OPTIONS.keys()) # User-friendly labels
80
+ model_values = list(MODEL_OPTIONS.values()) # Longer model names
81
  BEAM_OPTIONS = [2, 3, 4] # beam sizes users can choose from
82
  TOKEN_BATCH_OPTIONS = [
83
  1024,
 
575
  # )
576
  # load_file_button = gr.Button("Upload & Process File")
577
  with gr.Column(variant="compact"):
578
+ # model_name = gr.Dropdown(
579
+ # choices=MODEL_OPTIONS,
580
+ # value=MODEL_OPTIONS[0],
581
+ # label="Model Name",
582
+ # )
583
  model_name = gr.Dropdown(
584
+ choices=model_names,
585
+ value=model_names[0],
586
  label="Model Name",
587
  )
588
  # example_name = gr.Dropdown(