jkhamvan commited on
Commit
0fdd78c
1 Parent(s): 4ee3371

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -0
app.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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)