prlabs2023 commited on
Commit
3a99cb9
·
1 Parent(s): f874428

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -69,7 +69,7 @@ async def startup_event():
69
  audio_space="https://audiospace-1-u9912847.deta.app/uphoto"
70
 
71
  import threading
72
-
73
  client = InferenceClient()
74
 
75
 
@@ -104,7 +104,8 @@ async def get_answer(q: QueryM ):
104
  x = inference(inputs,generate_kwargs )[0]['generated_text']
105
  x=x.replace(inputs,'')
106
  return JSONResponse({"result":x,"status":True})
107
- except:
 
108
  return JSONResponse({"status":False})
109
 
110
 
 
69
  audio_space="https://audiospace-1-u9912847.deta.app/uphoto"
70
 
71
  import threading
72
+ from huggingface_hub.inference_api import InferenceApi
73
  client = InferenceClient()
74
 
75
 
 
104
  x = inference(inputs,generate_kwargs )[0]['generated_text']
105
  x=x.replace(inputs,'')
106
  return JSONResponse({"result":x,"status":True})
107
+ except Exception as e:
108
+ print(e)
109
  return JSONResponse({"status":False})
110
 
111