Spaces:
Runtime error
Runtime error
github-actions
commited on
Commit
·
695eff8
1
Parent(s):
e059d15
Auto files update [main]
Browse files
app.py
CHANGED
@@ -1,11 +1,15 @@
|
|
|
|
1 |
import subprocess
|
2 |
import sys
|
3 |
|
4 |
import evaluate
|
5 |
from evaluate.utils import launch_gradio_widget
|
6 |
|
|
|
7 |
# hotfix: somehow codebleu is not installed in the docker image
|
8 |
-
subprocess.
|
|
|
|
|
9 |
|
10 |
module = evaluate.load("k4black/codebleu")
|
11 |
launch_gradio_widget(module)
|
|
|
1 |
+
import importlib
|
2 |
import subprocess
|
3 |
import sys
|
4 |
|
5 |
import evaluate
|
6 |
from evaluate.utils import launch_gradio_widget
|
7 |
|
8 |
+
|
9 |
# hotfix: somehow codebleu is not installed in the docker image
|
10 |
+
subprocess.run([sys.executable, "-m", "pip", "install", "codebleu"], check=True)
|
11 |
+
globals()["codebleu"] = importlib.import_module("codebleu")
|
12 |
+
|
13 |
|
14 |
module = evaluate.load("k4black/codebleu")
|
15 |
launch_gradio_widget(module)
|