Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
# from transformers import pipeline
|
| 3 |
+
|
| 4 |
+
# chatbot = pipeline("text-generation", model="gpt2")
|
| 5 |
+
|
| 6 |
+
# def talk(prompt):
|
| 7 |
+
# return chatbot(prompt, max_length=50)[0]["generated_text"]
|
| 8 |
+
|
| 9 |
+
# demo = gr.Interface(fn=talk, inputs="text", outputs="text")
|
| 10 |
+
|
| 11 |
+
def greet (name):
|
| 12 |
+
return "Hello " + name + "!"
|
| 13 |
+
|
| 14 |
+
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 15 |
+
demo.launch()
|