dmccreary commited on
Commit
f9533a1
1 Parent(s): 9e1694f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -5
app.py CHANGED
@@ -1,7 +1,24 @@
1
  import gradio as gr
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
-
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
1
  import gradio as gr
2
+ from transformers import pipeline
3
+ title = "Transformers 📗 Sentence to Paragraph ❤️ For Mindfulness"
4
+ examples = [
5
+ ["Feel better physically by"],
6
+ ["Practicing mindfulness each day"],
7
+ ["Be happier by"],
8
+ ["Meditation can improve health"],
9
+ ["Spending time outdoors"],
10
+ ["Stress is relieved by quieting your mind, getting exercise and time with nature"],
11
+ ["Break the cycle of stress and anxiety"],
12
+ ["Feel calm in stressful situations"],
13
+ ["Deal with work pressure"],
14
+ ["Learn to reduce feelings of overwhelmed"]
15
+ ]
16
+ from gradio import inputs
17
+ from gradio.inputs import Textbox
18
+ from gradio import outputs
19
 
20
+ generator2 = gr.Interface.load("huggingface/EleutherAI/gpt-neo-2.7B")
21
+ generator3 = gr.Interface.load("huggingface/EleutherAI/gpt-j-6B")
22
+ generator1 = gr.Interface.load("huggingface/gpt2-large")
23
+ gr.Parallel(generator1, generator2, generator3, inputs=gr.inputs.Textbox(lines=5, label="Enter a sentence to get another sentence."),
24
+ title=title, examples=examples).launch(share=False)