Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,11 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from transformers import pipeline
|
| 3 |
|
| 4 |
+
pipe = pipeline("text-generation", model="42dot/42dot_LLM-PLM-1.3B")
|
| 5 |
+
|
| 6 |
+
def chat_with_model(prompt):
|
| 7 |
+
response = pipe(prompt)
|
| 8 |
+
return response[0]['generated_text']
|
| 9 |
+
|
| 10 |
+
interface = gr.Interface(fn=chat_with_model, inputs="text", outputs="text")
|
| 11 |
+
interface.launch()
|