Vihang28 commited on
Commit
490ada8
·
1 Parent(s): 0d1a2be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -44,20 +44,20 @@ def upload_img(image,api_key,img_ques):
44
 
45
  title = """<h1 align="center">GPT-4 Image Preview</h1>"""
46
 
47
- with gradio.Blocks() as demo:
48
- gradio.Markdown(title)
49
 
50
- with gradio.Row():
51
- with gradio.Column():
52
- image_input = gradio.Image(type="filepath", label="Upload Image")
53
- key_input = gradio.Textbox(label="Enter API-key")
54
- upload_button = gradio.Button(value="Upload & Start Chat", interactive=True, variant="primary")
55
- btn_clear = gradio.ClearButton([image_input,key_input],[text])
56
 
57
- with gradio.Column():
58
- text = gradio.Textbox(label="Output")
59
- ques_input = gradio.Textbox(label="Enter the question")
60
- ques_clear = gradio.ClearButton([ques_input])
61
 
62
  upload_button.click(upload_img, inputs=[image_input,key_input,ques_input], outputs=text)
63
  btn_clear.add(text)
 
44
 
45
  title = """<h1 align="center">GPT-4 Image Preview</h1>"""
46
 
47
+ with gr.Blocks() as demo:
48
+ gr.Markdown(title)
49
 
50
+ with gr.Row():
51
+ with gr.Column():
52
+ image_input = gr.Image(type="filepath", label="Upload Image")
53
+ key_input = gr.Textbox(label="Enter API-key")
54
+ upload_button = gr.Button(value="Upload & Start Chat", interactive=True, variant="primary")
55
+ btn_clear = gr.ClearButton([image_input,key_input],[text])
56
 
57
+ with gr.Column():
58
+ text = gr.Textbox(label="Output")
59
+ ques_input = gr.Textbox(label="Enter the question")
60
+ ques_clear = gr.ClearButton([ques_input])
61
 
62
  upload_button.click(upload_img, inputs=[image_input,key_input,ques_input], outputs=text)
63
  btn_clear.add(text)