Omnibus commited on
Commit
64dcdf0
1 Parent(s): c745c39

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -73,7 +73,7 @@ def get_screenshot(chat: list,height=5000,width=600,chatblock=[],theme="light",w
73
 
74
 
75
  def clear_fn():
76
- return None,None,None
77
  rand_val=random.randint(1,1111111111111111)
78
  def check_rand(inp,val):
79
  if inp==True:
@@ -122,10 +122,8 @@ with gr.Blocks() as app:
122
  chatblock=gr.Dropdown(label="Chatblocks",info="Choose specific blocks of chat",choices=[c for c in range(1,40)],multiselect=True)
123
 
124
 
125
-
126
- im_btn.click(get_screenshot,[chat_b,im_height,im_width,chatblock,theme,wait_time],img)
127
-
128
  go=btn.click(check_rand,[rand,seed],seed).then(chat_inf,[sys_inp,inp,chat_b,client_choice,seed,temp,tokens,top_p,rep_p],chat_b)
129
- stop_btn.click(None,None,None,cancels=go)
130
- clear_btn.click(clear_fn,None,[inp,sys_inp,chat_b])
131
  app.queue(default_concurrency_limit=10).launch()
 
73
 
74
 
75
  def clear_fn():
76
+ return None
77
  rand_val=random.randint(1,1111111111111111)
78
  def check_rand(inp,val):
79
  if inp==True:
 
122
  chatblock=gr.Dropdown(label="Chatblocks",info="Choose specific blocks of chat",choices=[c for c in range(1,40)],multiselect=True)
123
 
124
 
125
+ chat_sub=inp.submit(check_rand,[rand,seed],seed).then(chat_inf,[sys_inp,inp,chat_b,client_choice,seed,temp,tokens,top_p,rep_p],chat_b)
 
 
126
  go=btn.click(check_rand,[rand,seed],seed).then(chat_inf,[sys_inp,inp,chat_b,client_choice,seed,temp,tokens,top_p,rep_p],chat_b)
127
+ stop_btn.click(None,None,None,cancels=[go,im_go,chat_sub])
128
+ clear_btn.click(clear_fn,None,[chat_b])
129
  app.queue(default_concurrency_limit=10).launch()