Fredric commited on
Commit
33c4cc8
·
1 Parent(s): 5e3be79

add to deploy into vercel

Browse files
Files changed (7) hide show
  1. .env.example +1 -0
  2. .gitignore +2 -1
  3. app.py +1 -1
  4. requirements.txt +3 -2
  5. runtime.txt +1 -0
  6. vercel.json +15 -0
  7. wsgi.py +3 -0
.env.example ADDED
@@ -0,0 +1 @@
 
 
1
+ OPENAI_API_KEY=your_openai_api_key_here
.gitignore CHANGED
@@ -1,3 +1,4 @@
1
  .env
2
  *.mp3
3
- __pycache__/
 
 
1
  .env
2
  *.mp3
3
+ __pycache__/
4
+ .vercel
app.py CHANGED
@@ -78,4 +78,4 @@ with gr.Blocks(title="Emotional TTS Comparison") as demo:
78
  if __name__ == "__main__":
79
  demo.launch()
80
  else:
81
- demo.launch(share=True)
 
78
  if __name__ == "__main__":
79
  demo.launch()
80
  else:
81
+ app = gr.mount_gradio_app(demo, "/")
requirements.txt CHANGED
@@ -1,2 +1,3 @@
1
- gradio
2
- openai
 
 
1
+ gradio==3.50.2
2
+ openai>=1.0.0
3
+ python-dotenv==1.0.0
runtime.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ python-3.10
vercel.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 2,
3
+ "builds": [
4
+ {
5
+ "src": "app.py",
6
+ "use": "@vercel/python"
7
+ }
8
+ ],
9
+ "routes": [
10
+ {
11
+ "src": "/(.*)",
12
+ "dest": "app.py"
13
+ }
14
+ ]
15
+ }
wsgi.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ from app import demo
2
+
3
+ app = demo.launch()