xyplon
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,6 +44,8 @@ def Hf():
|
|
| 44 |
'model' : model,
|
| 45 |
'style': style
|
| 46 |
})
|
|
|
|
|
|
|
| 47 |
for chunk in req.iter_lines():
|
| 48 |
yield f'{chunk.decode()}\n'
|
| 49 |
return Response(Gen(prompt=prompt,negative=negative,steps=steps,width=width,height=height,scale=scale,style=style,model=model), mimetype="text/event-stream")
|
|
|
|
| 44 |
'model' : model,
|
| 45 |
'style': style
|
| 46 |
})
|
| 47 |
+
if(req.status!=200):
|
| 48 |
+
return "an error occurred! ", 500
|
| 49 |
for chunk in req.iter_lines():
|
| 50 |
yield f'{chunk.decode()}\n'
|
| 51 |
return Response(Gen(prompt=prompt,negative=negative,steps=steps,width=width,height=height,scale=scale,style=style,model=model), mimetype="text/event-stream")
|