Spaces:
Running
Running
Upload main.py
Browse files
main.py
CHANGED
@@ -470,6 +470,16 @@ def ocr_space_url(
|
|
470 |
except (json.JSONDecodeError, KeyError):
|
471 |
return "Error parsing the OCR response."
|
472 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
473 |
@app.get("/ryuzaki/freechatgpt-beta", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
474 |
def free_chatgpt4_beta(item: ChatgptCustom):
|
475 |
try:
|
|
|
470 |
except (json.JSONDecodeError, KeyError):
|
471 |
return "Error parsing the OCR response."
|
472 |
|
473 |
+
@app.get("/ryuzaki/nochatgpt", response_model=SuccessResponse, responses={422: {"model": SuccessResponse}})
|
474 |
+
def no_chatgpt(query: str=None):
|
475 |
+
try:
|
476 |
+
url = "http://216.98.10.228:5000"
|
477 |
+
api_method = f"{url}/gpt?ask={query}"
|
478 |
+
response = requests.get(url)
|
479 |
+
return SuccessResponse(status="True", randydev={"message": response.text})
|
480 |
+
except:
|
481 |
+
return SuccessResponse(status="False", randydev={"message": "Error response"})
|
482 |
+
|
483 |
@app.get("/ryuzaki/freechatgpt-beta", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
484 |
def free_chatgpt4_beta(item: ChatgptCustom):
|
485 |
try:
|