Spaces:
Runtime error
Runtime error
arjunpatel
commited on
Commit
•
19c6000
1
Parent(s):
b4075da
Behind The Model tab
Browse files- gradio_demo.py +18 -1
gradio_demo.py
CHANGED
@@ -198,7 +198,24 @@ with demo:
|
|
198 |
gr.Markdown("<h3> Generation History <h3>")
|
199 |
# Displays a dataframe with the history of moves generated, with parameters
|
200 |
history = gr.Dataframe(headers=["Move Name", "Move Description", "Generation Type", "Parameters"])
|
201 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
text_button_baseline.click(create_move, inputs=[text_input_baseline, history],
|
203 |
outputs=[text_output_baseline, history])
|
204 |
text_button_greedy.click(create_greedy_search_move, inputs=[text_input_greedy, history],
|
|
|
198 |
gr.Markdown("<h3> Generation History <h3>")
|
199 |
# Displays a dataframe with the history of moves generated, with parameters
|
200 |
history = gr.Dataframe(headers=["Move Name", "Move Description", "Generation Type", "Parameters"])
|
201 |
+
with gr.Row():
|
202 |
+
gr.Markdown("<h3>How did you make this?<h3>")
|
203 |
+
gr.Markdown("""
|
204 |
+
I collected the dataset from Serebii (https://www.serebii.net) , a news source and aggregator of Pokemon info.
|
205 |
+
|
206 |
+
|
207 |
+
I then added a seed phrase "This move is called" just before each move in order to assist the model in generation.
|
208 |
+
|
209 |
+
|
210 |
+
I then followed HuggingFace's handy language_modeling.ipynb for fine-tuning distillgpt2 on this tiny dataset, and
|
211 |
+
it surprisingly worked!
|
212 |
+
|
213 |
+
|
214 |
+
I learned all about text generation using the book Natural Language Processing with Transformers by Lewis Turnstall,
|
215 |
+
Leandro von Werra and Thomas Wolf, as well as this fantastic article (https://huggingface.co/blog/how-to-generate) by
|
216 |
+
Patrick von Platen. Thanks to all of these folks for creating these learning materials, and thanks to the
|
217 |
+
Hugging Face team for developing this product!
|
218 |
+
""")
|
219 |
text_button_baseline.click(create_move, inputs=[text_input_baseline, history],
|
220 |
outputs=[text_output_baseline, history])
|
221 |
text_button_greedy.click(create_greedy_search_move, inputs=[text_input_greedy, history],
|