You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromgradio_clientimportClientclient=Client("http://127.0.0.1:7860/")
result=client.predict(
"https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png", # str (filepath on your computer (or URL) of image) in 'parameter_5' Image component"Howdy!", # str in 'User' Textbox componentfn_index=0
)
print(result)
But i got this error
Traceback (most recent call last):
File "/home/cbigo/workspace/LaVIN/my_test.py", line 4, in<module>
result = client.predict(
File "/home/cbigo/anaconda3/envs/lavin/lib/python3.8/site-packages/gradio_client/client.py", line 292, in predict
return self.submit(*args, api_name=api_name, fn_index=fn_index).result()
File "/home/cbigo/anaconda3/envs/lavin/lib/python3.8/site-packages/gradio_client/client.py", line 1131, in result
returnsuper().result(timeout=timeout)
File "/home/cbigo/anaconda3/envs/lavin/lib/python3.8/concurrent/futures/_base.py", line 444, in result
returnself.__get_result()
File "/home/cbigo/anaconda3/envs/lavin/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/home/cbigo/anaconda3/envs/lavin/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/cbigo/anaconda3/envs/lavin/lib/python3.8/site-packages/gradio_client/client.py", line 799, in _inner
predictions = self.process_predictions(*predictions)
File "/home/cbigo/anaconda3/envs/lavin/lib/python3.8/site-packages/gradio_client/client.py", line 991, in process_predictions
predictions = self.deserialize(*predictions)
File "/home/cbigo/anaconda3/envs/lavin/lib/python3.8/site-packages/gradio_client/client.py", line 977, in deserialize
[
File "/home/cbigo/anaconda3/envs/lavin/lib/python3.8/site-packages/gradio_client/client.py", line 978, in<listcomp>
s.deserialize(
File "/home/cbigo/anaconda3/envs/lavin/lib/python3.8/site-packages/gradio_client/serializing.py", line 206, in deserialize
file = utils.decode_base64_to_file(x, dir=save_dir)
File "/home/cbigo/anaconda3/envs/lavin/lib/python3.8/site-packages/gradio_client/utils.py", line 449, in decode_base64_to_file
data, extension = decode_base64_to_binary(encoding)
File "/home/cbigo/anaconda3/envs/lavin/lib/python3.8/site-packages/gradio_client/utils.py", line 414, in decode_base64_to_binary
extension = get_extension(encoding)
File "/home/cbigo/anaconda3/envs/lavin/lib/python3.8/site-packages/gradio_client/utils.py", line 360, in get_extension
encoding = encoding.replace("audio/wav", "audio/x-wav")
AttributeError: 'dict' object has no attribute 'replace'
I would like to execute this reference
Please tell me how to do it
The text was updated successfully, but these errors were encountered:
I found this reference in your demo
i try to execute from this method with below code
But i got this error
I would like to execute this reference
Please tell me how to do it
The text was updated successfully, but these errors were encountered: