awacke1 commited on
Commit
a255fdc
·
1 Parent(s): 1e471ba

Upload app.py

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