Final fix
Browse files
app.py
CHANGED
@@ -119,11 +119,11 @@ def get_text(specification: str, version: str):
|
|
119 |
|
120 |
def get_latest_version(spec: str) -> str:
|
121 |
try:
|
122 |
-
req = requests.post("https://organizedprogrammers-3gppdocfinder.hf.space/find", headers={"
|
123 |
except Exception as e:
|
124 |
raise HTTPException(500, f"An error has occured while getting latest version: {e}")
|
125 |
if req.status_code == 200:
|
126 |
-
reqJS = req.json
|
127 |
return reqJS['version']
|
128 |
else:
|
129 |
raise HTTPException(req.status_code, "An error has occured while getting latest version")
|
|
|
119 |
|
120 |
def get_latest_version(spec: str) -> str:
|
121 |
try:
|
122 |
+
req = requests.post("https://organizedprogrammers-3gppdocfinder.hf.space/find", headers={"Content-Type": "application/json"}, data=json.dumps({"doc_id": spec}), verify=False)
|
123 |
except Exception as e:
|
124 |
raise HTTPException(500, f"An error has occured while getting latest version: {e}")
|
125 |
if req.status_code == 200:
|
126 |
+
reqJS = req.json()
|
127 |
return reqJS['version']
|
128 |
else:
|
129 |
raise HTTPException(req.status_code, "An error has occured while getting latest version")
|