Spaces:
Runtime error
Runtime error
xJuuzouYTx
commited on
Commit
•
66d588d
1
Parent(s):
0cb3834
[ADD] post and search models
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ import zipfile
|
|
5 |
import hashlib
|
6 |
from utils.model import model_downloader, get_model
|
7 |
import requests
|
|
|
8 |
|
9 |
api_url = "https://rvc-models-api.onrender.com/uploadfile/"
|
10 |
|
@@ -85,7 +86,7 @@ def post_model(name, model_url, version, creator):
|
|
85 |
# Comprobar la respuesta
|
86 |
if response.status_code == 200:
|
87 |
result = response.json()
|
88 |
-
return result
|
89 |
else:
|
90 |
print("Error al cargar el archivo:", response.status_code)
|
91 |
return result
|
|
|
5 |
import hashlib
|
6 |
from utils.model import model_downloader, get_model
|
7 |
import requests
|
8 |
+
import json
|
9 |
|
10 |
api_url = "https://rvc-models-api.onrender.com/uploadfile/"
|
11 |
|
|
|
86 |
# Comprobar la respuesta
|
87 |
if response.status_code == 200:
|
88 |
result = response.json()
|
89 |
+
return json.dumps(result, indent=4)
|
90 |
else:
|
91 |
print("Error al cargar el archivo:", response.status_code)
|
92 |
return result
|