Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,16 @@
|
|
| 1 |
import os
|
| 2 |
import sys
|
| 3 |
|
| 4 |
-
# 強制下載模型
|
|
|
|
| 5 |
os.system(f"{sys.executable} -m spacy download en_core_web_sm")
|
| 6 |
|
| 7 |
import gradio as gr
|
| 8 |
from fastcoref import FCoref
|
| 9 |
from deep_translator import GoogleTranslator
|
| 10 |
|
|
|
|
|
|
|
| 11 |
# 初始化英文核心大腦
|
| 12 |
model = FCoref()
|
| 13 |
|
|
|
|
| 1 |
import os
|
| 2 |
import sys
|
| 3 |
|
| 4 |
+
# 強制安裝與下載模型
|
| 5 |
+
os.system(f"{sys.executable} -m pip install spacy")
|
| 6 |
os.system(f"{sys.executable} -m spacy download en_core_web_sm")
|
| 7 |
|
| 8 |
import gradio as gr
|
| 9 |
from fastcoref import FCoref
|
| 10 |
from deep_translator import GoogleTranslator
|
| 11 |
|
| 12 |
+
|
| 13 |
+
|
| 14 |
# 初始化英文核心大腦
|
| 15 |
model = FCoref()
|
| 16 |
|