Spaces:
Runtime error
Runtime error
Commit
•
1fd5f9d
1
Parent(s):
a7233a3
fix path
Browse files
main.py
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import sys
|
|
|
|
|
3 |
import tensorflow_text as tftxt
|
4 |
import tensorflow as tf
|
5 |
from official.core import exp_factory, task_factory
|
@@ -9,7 +11,6 @@ tokenizer= tftxt.SentencepieceTokenizer(
|
|
9 |
model=tf.io.gfile.GFile("/home/user/app/pretrained_v2/sentencepiece_en_tr.model", "rb").read(),
|
10 |
add_eos=True)
|
11 |
|
12 |
-
sys.path = ['/home/user/app/nmt-en-tr/datasets', '/home/user/app/nmt-en-tr/models'] + sys.path
|
13 |
# sys.path = ['/root/.local/lib/python3.10/site-packages', '/root/.local/bin'] + sys.path
|
14 |
|
15 |
task_config = exp_factory.get_exp_config('transformer_tr_en_blended/base').task
|
|
|
1 |
import gradio as gr
|
2 |
import sys
|
3 |
+
sys.path = ['/home/user/app/nmt-en-tr/datasets', '/home/user/app/nmt-en-tr/models'] + sys.path
|
4 |
+
|
5 |
import tensorflow_text as tftxt
|
6 |
import tensorflow as tf
|
7 |
from official.core import exp_factory, task_factory
|
|
|
11 |
model=tf.io.gfile.GFile("/home/user/app/pretrained_v2/sentencepiece_en_tr.model", "rb").read(),
|
12 |
add_eos=True)
|
13 |
|
|
|
14 |
# sys.path = ['/root/.local/lib/python3.10/site-packages', '/root/.local/bin'] + sys.path
|
15 |
|
16 |
task_config = exp_factory.get_exp_config('transformer_tr_en_blended/base').task
|