subhrajit-katonic commited on
Commit ·
8444542
1
Parent(s): 9253a16
Documentation updated
Browse files47 unmodified lines48495047 unmodified linesprint(response.json())```47 unmodified lines48495051525354555657585960616263646547 unmodified linesprint(response.json())```### Check list of tokens```import requestsheaders = {'accept': 'application/json','Content-Type': 'application/json','Authorization': 'Bearer TOKEN}response = requests.get('https://subhraj07-chatapi.hf.space/list', headers=headers)print(response.json())```
44 unmodified lines454647484950515253545544 unmodified linesasync def list():try:return {"Check here": "https://huggingface.co/spaces/Subhraj07/chatapi/blob/main/README.md"}except Exception as e:raise HTTPException(status_code=500, detail="An error occurred while processing the request." + str(e))@app.post("/create")async def create(data: RefToken):token = "Reference Key is incorrect"44 unmodified lines45464748495051525354555644 unmodified linesasync def list():try:return {"Please Check the documentation here": "https://huggingface.co/spaces/Subhraj07/chatapi/blob/main/README.md","Swagger UI" : "https://subhraj07-chatapi.hf.space/docs"}except Exception as e:raise HTTPException(status_code=500, detail="An error occurred while processing the request." + str(e))@app.post("/create")async def create(data: RefToken):token = "Reference Key is incorrect"
README.md+15
app.py+3-2