Update app.py
Browse files107 unmodified lines108109110111112113114115116117118119120121122123124125111112113114107 unmodified lines print(f'Get response successfully within {time.time() - start}')
try: json_data = json.loads(response) text_hint += f"[ERROR] {json_data['error']} \n" gr.Warning( f"[ERROR] {json_data['error']} \n" ) return ( text_hint, None, None, ) except: with open(save_path, 'wb') as f: f.write(response)
# Check the response if response.status_code == 200: try:app.py+1-15