Closed zion4343 closed 1 week ago
Although I see https://github.com/lllyasviel/Fooocus/issues/172 and tried to serialize, my program says
"TypeError Traceback (most recent call last) in <cell line: 6>() 4 import matplotlib.image as mpimg 5 ----> 6 client = Client("https://767cb031c1d6b9ee18.gradio.live/", serialize=False) #url of the working Fooocus 7 result = client.predict( 8 True, # bool in 'Generate Image Grid for Each Batch' Checkbox component
TypeError: Client.init() got an unexpected keyword argument 'serialize'
gradio_client already stoped to support serialization when gradio_client becomes v1.0 https://www.gradio.app/docs/python-client/version-1-release
Checklist
What happened?
Can anyone give me the example of using API? Although I tried to use the API, my program cause the error, "AttributeError: 'dict' object has no attribute 'replace'" I will post my program and the detail of the error.
Please let me know how can I solve the error.
Steps to reproduce the problem
from gradio_client import Client
import matplotlib.pyplot as plt import matplotlib.image as mpimg
client = Client("https://767cb031c1d6b9ee18.gradio.live/") #url of the working Fooocus result = client.predict( True, # bool in 'Generate Image Grid for Each Batch' Checkbox component "", # str in 'parameter_11' Textbox component "", # str in 'Negative Prompt' Textbox component ["Fooocus V2"], # List[str] in 'Selected Styles' Checkboxgroup component
)
result = client.predict( fn_index=47 )
img = mpimg.imread(result[2]) imgplot = plt.imshow(img) plt.show()
What should have happened?
Fooocus should not happen the error type.
What browsers do you use to access Fooocus?
Google Chrome
Where are you running Fooocus?
Cloud (Google Colab)
What operating system are you using?
No response
Console logs
Additional information
No response