Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Improve name of the model detection to allow several URL usages
#28
by
Pablohn26
- opened
- src/model_utils.py +2 -2
src/model_utils.py
CHANGED
@@ -23,8 +23,8 @@ def extract_from_url(name: str):
|
|
23 |
if not is_url:
|
24 |
return name
|
25 |
else:
|
26 |
-
path = result.path
|
27 |
-
return path[1:]
|
28 |
|
29 |
|
30 |
def translate_llama2(text):
|
|
|
23 |
if not is_url:
|
24 |
return name
|
25 |
else:
|
26 |
+
path = result.path.split('/')
|
27 |
+
return '/'.join(path[1:3])
|
28 |
|
29 |
|
30 |
def translate_llama2(text):
|