Spaces:
Running
Running
Update index.html
Browse files- index.html +2 -2
index.html
CHANGED
@@ -33,10 +33,10 @@ transformers = await import_transformers_js()
|
|
33 |
pipeline = transformers.pipeline
|
34 |
pipe = await pipeline('text-generation', 'Xenova/LaMini-Cerebras-590M')
|
35 |
|
36 |
-
async def
|
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 |
|
|
|
33 |
pipeline = transformers.pipeline
|
34 |
pipe = await pipeline('text-generation', 'Xenova/LaMini-Cerebras-590M')
|
35 |
|
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(generate, gr.Textbox(label="Initial Prompt"), gr.JSON(label="Generated Text"), 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"])
|
40 |
demo.launch()
|
41 |
</gradio-file>
|
42 |
|