Spaces:
Runtime error
Runtime error
Added title and description to app
Browse files- README.md +7 -0
- shakespeare_demo.py +12 -7
README.md
CHANGED
@@ -11,3 +11,10 @@ license: wtfpl
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
14 |
+
|
15 |
+
TODO:
|
16 |
+
* Deploy to Hugging Face
|
17 |
+
* Link from Github page
|
18 |
+
* Check-box for whether to cut after new sonnet
|
19 |
+
* Random seed (defaulting to None)
|
20 |
+
* top_p slider
|
shakespeare_demo.py
CHANGED
@@ -77,6 +77,14 @@ examples = [
|
|
77 |
if MAIN:
|
78 |
print(safe_generate('How I love thee'))
|
79 |
#%%
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
def make_demo():
|
81 |
demo = gr.Interface(
|
82 |
fn=safe_generate,
|
@@ -94,12 +102,9 @@ def make_demo():
|
|
94 |
),
|
95 |
],
|
96 |
outputs=gr.components.Textbox(label="Generated Text"),
|
97 |
-
examples=examples
|
|
|
|
|
98 |
)
|
99 |
demo.launch()
|
100 |
-
|
101 |
-
'''
|
102 |
-
FIXME:
|
103 |
-
* deploy to hugging face
|
104 |
-
* link from github home
|
105 |
-
'''
|
|
|
77 |
if MAIN:
|
78 |
print(safe_generate('How I love thee'))
|
79 |
#%%
|
80 |
+
description = """
|
81 |
+
Provide a prompt in the "Input Text" window below and then click "Submit".
|
82 |
+
The small Shakespeare transformer model trained on my laptop will attempt to
|
83 |
+
complete the Sonnet that you started.
|
84 |
+
|
85 |
+
Thanks to Project Gutenberg for providing the training corpus.
|
86 |
+
"""
|
87 |
+
#%%
|
88 |
def make_demo():
|
89 |
demo = gr.Interface(
|
90 |
fn=safe_generate,
|
|
|
102 |
),
|
103 |
],
|
104 |
outputs=gr.components.Textbox(label="Generated Text"),
|
105 |
+
examples=examples,
|
106 |
+
title='Shakespeare transformer sampling',
|
107 |
+
description=description,
|
108 |
)
|
109 |
demo.launch()
|
110 |
+
#%%
|
|
|
|
|
|
|
|
|
|