The Api through Gradio no working

#3
by adilraza626 - opened

from gradio_client import Client, file

client = Client("AIRI-Institute/HairFastGAN")
result = client.predict(
face=file('https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png'),
shape=file('https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png'),
color=file('https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png'),
blending="Article",
poisson_iters=0,
poisson_erosion=15,
api_name="/swap_hair"
)
print(result)

When i tried to access it with Gradio api its showing the following error

Traceback (most recent call last):
File "script.py", line 7, in
result = client.predict(
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\gradio_client\client.py", line 457, in predict
return self.submit(
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\gradio_client\client.py", line 1480, in result
return super().result(timeout=timeout)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\concurrent\futures_base.py", line 439, in result
return self.__get_result()
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\concurrent\futures_base.py", line 388, in __get_result
raise self._exception
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\concurrent\futures\thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\gradio_client\client.py", line 1107, in _inner
predictions = _predict(*data)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\gradio_client\client.py", line 1218, in _predict
raise AppError(
gradio_client.exceptions.AppError: The upstream Gradio app has raised an exception but has not enabled verbose error reporting. To enable, set show_error=True in launch().

Sign up or log in to comment