patrickvonplaten commited on
Commit
3af6dbb
·
1 Parent(s): 2b628a6
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -20,16 +20,16 @@ Options:
20
  API_URL = os.getenv("API_URL")
21
 
22
  examples = [
23
- ['A "whatpu" is a small, furry animal native to Tanzania. An example of a sentence that uses the word whatpu is: We were traveling in Africa and we saw these very cute whatpus. To do a "farduddle" means to jump up and down really fast. An example of a sentence that uses the word farduddle is:', 32, "Sample", False, "Sample 1"],
24
  ['A poem about the beauty of science by Alfred Edgar Brittle\nTitle: The Magic Craft\nIn the old times', 64, "Sample", False, "Sample 1"],
25
- ['استخراج العدد العاملي في لغة بايثون:', 32, "Greedy", False, "Sample 1"],
26
- ["Pour déguster un ortolan, il faut tout d'abord", 32, "Sample", False, "Sample 1"],
27
- ['Traduce español de España a español de Argentina\nEl coche es rojo - el auto es rojo\nEl ordenador es nuevo - la computadora es nueva\nel boligrafo es negro -', 32, "Sample", False, "Sample 1"],
28
- ['Estos ejemplos quitan vocales de las palabras\nEjemplos:\nhola - hl\nmanzana - mnzn\npapas - pps\nalacran - lcrn\npapa -', 32, "Sample", False, "Sample 1"],
29
- ["Question: If I put cheese into the fridge, will it melt?\nAnswer:", 32, "Sample", False, "Sample 1"],
30
- ["Math exercise - answers:\n34+10=44\n54+20=", 32, "Greedy", False, "Sample 1"],
31
- ["Question: Where does the Greek Goddess Persephone spend half of the year when she is not with her mother?\nAnswer:", 32, "Greedy", False, "Sample 1"],
32
- ["spelling test answers.\nWhat are the letters in « language »?\nAnswer: l-a-n-g-u-a-g-e\nWhat are the letters in « Romanian »?\nAnswer:", 32, "Greedy", False, "Sample 1"],
33
  ]
34
 
35
  def query(payload):
@@ -89,7 +89,6 @@ gr.Interface(
89
  gr.inputs.Radio([32, 64], default=32, label="Tokens to generate"),
90
  gr.inputs.Radio(["sampling", "greedy"], label="Sample or greedy", default="Sample"),
91
  gr.Checkbox(label="Just output raw text"),
92
- gr.inputs.Radio(["Sample 1", "Sample 2", "Sample 3", "Sample 4", "Sample 5"], default="Sample 1", label="Sample other generations (only work in 'Sample' mode", type="index"),
93
  ],
94
  ["image", "text"],
95
  examples=examples,
 
20
  API_URL = os.getenv("API_URL")
21
 
22
  examples = [
23
+ ['A "whatpu" is a small, furry animal native to Tanzania. An example of a sentence that uses the word whatpu is: We were traveling in Africa and we saw these very cute whatpus. To do a "farduddle" means to jump up and down really fast. An example of a sentence that uses the word farduddle is:', 32, "Sample", False]
24
  ['A poem about the beauty of science by Alfred Edgar Brittle\nTitle: The Magic Craft\nIn the old times', 64, "Sample", False, "Sample 1"],
25
+ ['استخراج العدد العاملي في لغة بايثون:', 32, "Greedy", False]
26
+ ["Pour déguster un ortolan, il faut tout d'abord", 32, "Sample", False]
27
+ ['Traduce español de España a español de Argentina\nEl coche es rojo - el auto es rojo\nEl ordenador es nuevo - la computadora es nueva\nel boligrafo es negro -', 32, "Sample", False]
28
+ ['Estos ejemplos quitan vocales de las palabras\nEjemplos:\nhola - hl\nmanzana - mnzn\npapas - pps\nalacran - lcrn\npapa -', 32, "Sample", False],
29
+ ["Question: If I put cheese into the fridge, will it melt?\nAnswer:", 32, "Sample", False],
30
+ ["Math exercise - answers:\n34+10=44\n54+20=", 32, "Greedy", False],
31
+ ["Question: Where does the Greek Goddess Persephone spend half of the year when she is not with her mother?\nAnswer:", 32, "Greedy", False],
32
+ ["spelling test answers.\nWhat are the letters in « language »?\nAnswer: l-a-n-g-u-a-g-e\nWhat are the letters in « Romanian »?\nAnswer:", 32, "Greedy", False],
33
  ]
34
 
35
  def query(payload):
 
89
  gr.inputs.Radio([32, 64], default=32, label="Tokens to generate"),
90
  gr.inputs.Radio(["sampling", "greedy"], label="Sample or greedy", default="Sample"),
91
  gr.Checkbox(label="Just output raw text"),
 
92
  ],
93
  ["image", "text"],
94
  examples=examples,