Omnibus commited on
Commit
09e3a4b
1 Parent(s): f1ba07f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -4
app.py CHANGED
@@ -1,4 +1,6 @@
1
- from gradio_client import Client, InferenceClient
 
 
2
  import gradio as gr
3
  ss_client = Client("https://omnibus-html-image-current-tab.hf.space/")
4
  client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
@@ -50,13 +52,19 @@ chat=[('user','bot'),('user','bot')]
50
  #get_screenshot(chat=[('user','bot'),('user','bot')])
51
  with gr.Blocks() as app:
52
  with gr.Row():
53
- with gr.Column(scale=2):
54
  chat_b = gr.Chatbot()
 
 
 
 
 
 
 
 
55
  with gr.Column(scale=1):
56
  with gr.Group():
57
- inp = gr.Textbox(label="Prompt")
58
  sys_inp = gr.Textbox(label="System Prompt")
59
- btn = gr.Button("Chat")
60
  im_btn=gr.Button("Screenshot")
61
  img=gr.Image(type='filepath')
62
  btn.click(chat_inf,[sys_inp,inp,chatbot],chatbot)
 
1
+ from gradio_client import Client
2
+ from huggingface_hub import InferenceClient
3
+
4
  import gradio as gr
5
  ss_client = Client("https://omnibus-html-image-current-tab.hf.space/")
6
  client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
 
52
  #get_screenshot(chat=[('user','bot'),('user','bot')])
53
  with gr.Blocks() as app:
54
  with gr.Row():
55
+ with gr.Column(scale=3):
56
  chat_b = gr.Chatbot()
57
+ with gr.Row():
58
+ with gr.Column(scale=3):
59
+ inp = gr.Textbox(label="Prompt")
60
+ with gr.Column(scale=1):
61
+ btn = gr.Button("Chat")
62
+ with gr.Group():
63
+ stop_btn=gr.Button("Stop")
64
+ clear_btn=gr.Button("Clear")
65
  with gr.Column(scale=1):
66
  with gr.Group():
 
67
  sys_inp = gr.Textbox(label="System Prompt")
 
68
  im_btn=gr.Button("Screenshot")
69
  img=gr.Image(type='filepath')
70
  btn.click(chat_inf,[sys_inp,inp,chatbot],chatbot)