API issues

#32
by shanch - opened
from gradio_client import Client

client = Client("https://vision-cair-minigpt4.hf.space", serialize=False)
    result = client.predict(
        "https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png",
        "What is in the picture", 
        fn_index=0
    )
    print(result)

Running encountered the following error:

Loaded as API: https://vision-cair-minigpt4.hf.space/ ✔
Traceback (most recent call last):
  File "/Users/shanchanghui/Documents/code/aishuren/python-script/minigpt4.py", line 15, in <module>
    result = client.predict(
  File "/opt/homebrew/lib/python3.9/site-packages/gradio_client/client.py", line 292, in predict
    return self.submit(*args, api_name=api_name, fn_index=fn_index).result()
  File "/opt/homebrew/lib/python3.9/site-packages/gradio_client/client.py", line 1131, in result
    return super().result(timeout=timeout)
  File "/opt/homebrew/Cellar/[email protected]/3.9.17_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/_base.py", line 446, in result
    return self.__get_result()
  File "/opt/homebrew/Cellar/[email protected]/3.9.17_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
    raise self._exception
  File "/opt/homebrew/Cellar/[email protected]/3.9.17_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/gradio_client/client.py", line 798, in _inner
    predictions = _predict(*data)
  File "/opt/homebrew/lib/python3.9/site-packages/gradio_client/client.py", line 829, in _predict
    raise ValueError(result["error"])
ValueError: None
This comment has been hidden

How did you solve this problem?

How did you solve this problem?

API does not exist

Hi, the same issue here, what do you mean by 'not exist'???

Sign up or log in to comment