Spaces:
Runtime error
Runtime error
Update app.py
#1
by
Omnibus
- opened
app.py
CHANGED
@@ -2,7 +2,7 @@ from gradio_client import Client
|
|
2 |
import gradio as gr
|
3 |
client = Client("https://omnibus-html-image-current-tab.hf.space/--replicas/o0seq/")
|
4 |
|
5 |
-
def get_screenshot(chat,height=5000,width=600,chatblock=[1],header=True,theme="light",wait=3000):
|
6 |
result = client.predict(chat,height,width,chatblock,header,theme,wait,api_name="/run_script")
|
7 |
# str in 'Chat: [('user','bot'),('user','bot')]' Textbox component
|
8 |
# float in 'Height' Number component
|
@@ -22,10 +22,12 @@ def get_screenshot(chat,height=5000,width=600,chatblock=[1],header=True,theme="l
|
|
22 |
print(out)
|
23 |
return out
|
24 |
|
|
|
25 |
|
26 |
-
get_screenshot(chat=[('user','bot'),('user','bot')])
|
27 |
with gr.Blocks() as app:
|
|
|
28 |
img=gr.Image(type='filepath')
|
29 |
-
|
30 |
-
app.load(get_screenshot,
|
31 |
app.launch()
|
|
|
2 |
import gradio as gr
|
3 |
client = Client("https://omnibus-html-image-current-tab.hf.space/--replicas/o0seq/")
|
4 |
|
5 |
+
def get_screenshot(chat: list,height=5000,width=600,chatblock=[1],header=True,theme="light",wait=3000):
|
6 |
result = client.predict(chat,height,width,chatblock,header,theme,wait,api_name="/run_script")
|
7 |
# str in 'Chat: [('user','bot'),('user','bot')]' Textbox component
|
8 |
# float in 'Height' Number component
|
|
|
22 |
print(out)
|
23 |
return out
|
24 |
|
25 |
+
chat=[('user','bot'),('user','bot')]
|
26 |
|
27 |
+
#get_screenshot(chat=[('user','bot'),('user','bot')])
|
28 |
with gr.Blocks() as app:
|
29 |
+
inp = gr.Textbox(value=chat)
|
30 |
img=gr.Image(type='filepath')
|
31 |
+
|
32 |
+
app.load(get_screenshot,inp,img)
|
33 |
app.launch()
|