update
Browse files- .gitignore +1 -0
- app.py +3 -10
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
local
|
app.py
CHANGED
@@ -1,11 +1,4 @@
|
|
1 |
-
import
|
2 |
-
from transformers import pipeline
|
3 |
|
4 |
-
|
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"])
|
|
|
|
|
|
|
|
|
|
|
|