Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
·
43f783c
1
Parent(s):
072f411
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
title = "DistilBERT"
|
| 4 |
+
|
| 5 |
+
description = "Gradio Demo for DistilBERT. To use it, simply add your text, or click one of the examples to load them. Read more at the links below."
|
| 6 |
+
|
| 7 |
+
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/1910.01108' target='_blank'>DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter</a></p>"
|
| 8 |
+
|
| 9 |
+
examples = [
|
| 10 |
+
['The goal of life is [MASK].']
|
| 11 |
+
]
|
| 12 |
+
|
| 13 |
+
gr.Interface.load("huggingface/distilbert-base-uncased", inputs=gr.inputs.Textbox(lines=5, label="Input Text"),title=title,description=description,article=article, examples=examples).launch(enable_queue=True)
|