Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -117,8 +117,8 @@ class Translator:
|
|
117 |
#from translator import *
|
118 |
lan = Translator()
|
119 |
def detect_onnx_models(path):
|
120 |
-
onnx_models = glob.glob('
|
121 |
-
onnx_configs = glob.glob('
|
122 |
if len(onnx_models) > 1:
|
123 |
return onnx_models, onnx_configs # Return both lists as a tuple
|
124 |
elif len(onnx_models) == 1:
|
@@ -182,7 +182,7 @@ async def load_model_data():
|
|
182 |
|
183 |
def load_model_configuration(models_path, config_name):
|
184 |
# Assuming config_name is the name of the JSON configuration file, e.g., 'model.json'
|
185 |
-
config_file_path = os.path.join(
|
186 |
|
187 |
try:
|
188 |
with open(config_file_path, 'r') as config_file:
|
|
|
117 |
#from translator import *
|
118 |
lan = Translator()
|
119 |
def detect_onnx_models(path):
|
120 |
+
onnx_models = glob.glob(path + '/*.onnx')
|
121 |
+
onnx_configs = glob.glob(path + '/*.json')
|
122 |
if len(onnx_models) > 1:
|
123 |
return onnx_models, onnx_configs # Return both lists as a tuple
|
124 |
elif len(onnx_models) == 1:
|
|
|
182 |
|
183 |
def load_model_configuration(models_path, config_name):
|
184 |
# Assuming config_name is the name of the JSON configuration file, e.g., 'model.json'
|
185 |
+
config_file_path = os.path.join("", config_name)
|
186 |
|
187 |
try:
|
188 |
with open(config_file_path, 'r') as config_file:
|