Spaces:
Runtime error
Runtime error
patrickvonplaten
commited on
Commit
•
a396b07
1
Parent(s):
3e69176
up
Browse files- .gitattributes +2 -0
- app.py +9 -9
.gitattributes
CHANGED
@@ -25,3 +25,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
25 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
25 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
28 |
+
*.ttf filter=lfs diff=lfs merge=lfs -text
|
29 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
@@ -21,15 +21,15 @@ 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',
|
25 |
-
['استخراج العدد العاملي في لغة بايثون:',
|
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 -',
|
28 |
-
['Estos ejemplos quitan vocales de las palabras\nEjemplos:\nhola - hl\nmanzana - mnzn\npapas - pps\nalacran - lcrn\npapa -',
|
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=",
|
31 |
-
["Question: Where does the Greek Goddess Persephone spend half of the year when she is not with her mother?\nAnswer:",
|
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:",
|
33 |
]
|
34 |
|
35 |
def query(payload):
|
@@ -59,7 +59,7 @@ def inference(input_sentence, max_length, sample_or_greedy, raw_text=False):
|
|
59 |
if raw_text:
|
60 |
return None, data[0]['generated_text']
|
61 |
|
62 |
-
width, height =
|
63 |
assets_path = "assets"
|
64 |
font_mapping = {
|
65 |
"latin characters (faster)": "DejaVuSans.ttf",
|
@@ -108,4 +108,4 @@ gr.Interface(
|
|
108 |
cache_examples=False,
|
109 |
title=title,
|
110 |
description=description
|
111 |
-
).launch()
|
|
|
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):
|
|
|
59 |
if raw_text:
|
60 |
return None, data[0]['generated_text']
|
61 |
|
62 |
+
width, height = 3326, 3326
|
63 |
assets_path = "assets"
|
64 |
font_mapping = {
|
65 |
"latin characters (faster)": "DejaVuSans.ttf",
|
|
|
108 |
cache_examples=False,
|
109 |
title=title,
|
110 |
description=description
|
111 |
+
).launch()
|