ShawnRu commited on
Commit
36208ce
·
1 Parent(s): 8f5fdc3
Files changed (2) hide show
  1. .gitignore +1 -0
  2. app.py +3 -10
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ local
app.py CHANGED
@@ -1,11 +1,4 @@
1
- import gradio as gr
2
- from transformers import pipeline
3
 
4
- pipe = pipeline('sentiment-analysis')
5
-
6
- def sentiment_analysis(text):
7
- return pipe(text)
8
-
9
- iface = gr.Interface(fn=sentiment_analysis, inputs="text", outputs="json", live=True)
10
-
11
- iface.launch()
 
1
+ import subprocess
 
2
 
3
+ # 运行 src/main.py 文件
4
+ subprocess.run(["python", "src/main.py"])