Spaces:
Runtime error
Runtime error
File size: 1,269 Bytes
18b083a 7cccb39 18b083a d1b3dae ea3a7a3 7cccb39 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
from gradio_client import Client
client = Client("https://omnibus-html-image-current-tab.hf.space/--replicas/o0seq/")
def get_screenshot(chat,height=5000,width=600,chatblock=[1],header=True,theme="light",wait=3000):
result = client.predict(chat,height,width,chatblock,header,theme,wait,api_name="/run_script")
# str in 'Chat: [('user','bot'),('user','bot')]' Textbox component
# float in 'Height' Number component
# float in 'Width' Number component
# List[Literal['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20']] in 'Chatblocks' Checkboxgroup component
# bool in 'Show Header' Checkbox component
# Literal['light', 'dark'] in 'Theme' Radio component
# float (numeric value between 1 and 10000) in 'Wait time' Slider component
# api_name="/run_script"
## return types:
# filepath representing output in 'value_25' Image component,
# str representing output in 'value_20' Html component,
# List[Dict(image: filepath, caption: str | None)] representing output in 'value_24' Gallery component,
# filepath representing output in 'value_23' Image component,
print(result[2])
get_screenshot(chat=[('user','bot'),('user','bot')]) |