Spaces:
Running
Running
Update index.html
Browse files- index.html +8 -1
index.html
CHANGED
|
@@ -36,7 +36,14 @@ pipe = await pipeline('text-generation', 'Xenova/LaMini-Cerebras-590M')
|
|
| 36 |
async def generate(text):
|
| 37 |
return await pipe(text, {"temperature": 2.0, "max_new_tokens": 50, "repetition_penalty": 1.5})
|
| 38 |
|
| 39 |
-
demo = gr.Interface(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
demo.launch()
|
| 41 |
</gradio-file>
|
| 42 |
|
|
|
|
| 36 |
async def generate(text):
|
| 37 |
return await pipe(text, {"temperature": 2.0, "max_new_tokens": 50, "repetition_penalty": 1.5})
|
| 38 |
|
| 39 |
+
demo = gr.Interface(
|
| 40 |
+
gr.Markdown("# On-Device Text Generation w/ Gradio-lite & Transformers.js"),
|
| 41 |
+
generate,
|
| 42 |
+
gr.Textbox(label="Initial Prompt"),
|
| 43 |
+
gr.JSON(label="Generated Text"),
|
| 44 |
+
examples=["I was walking in a nice neighborhood the other day ", "I'm an evil penguin and I", "It wasn't a bad film but"],
|
| 45 |
+
theme=gr.themes.Soft(),
|
| 46 |
+
flag=False)
|
| 47 |
demo.launch()
|
| 48 |
</gradio-file>
|
| 49 |
|