请基于以下的api构建一个api后端和对应的前端页面: from gradioclient import Client client =…
- User
请基于以下的api构建一个api后端和对应的前端页面: from gradio_client import Client
client = Client("https://hysts-sd-xl.hf.space/") result = client.predict( "Howdy!", # str in 'Prompt' Textbox component "Howdy!", # str in 'Negative prompt' Textbox component "Howdy!", # str in 'Prompt 2' Textbox component "Howdy!", # str in 'Negative prompt 2' Textbox component True, # bool in 'Use negative prompt' Checkbox component True, # bool in 'Use prompt 2' Checkbox component True, # bool in 'Use negative prompt 2' Checkbox component 0, # int | float (numeric value between 0 and 2147483647) in 'Seed' Slider component 256, # int | float (numeric value between 256 and 1024) in 'Width' Slider component 256, # int | float (numeric value between 256 and 1024) in 'Height' Slider component 1, # int | float (numeric value between 1 and 20) in 'Guidance scale for base' Slider component 1, # int | float (numeric value between 1 and 20) in 'Guidance scale for refiner' Slider component 10, # int | float (numeric value between 10 and 100) in 'Number of inference steps for base' Slider component 10, # int | float (numeric value between 10 and 100) in 'Number of inference steps for refiner' Slider component True, # bool in 'Apply refiner' Checkbox component api_name="/run" ) print(result) 注意: Return Type(s)
str (filepath on your computer (or URL) of image) representing output in 'Result' Image component
- Assistant
- User
请优化前端页面,使得它更加功能详细且完善
- Assistant