RamAnanth1 commited on
Commit
79f16cc
·
1 Parent(s): 53ce98a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -291,13 +291,13 @@ class BLIPVQA:
291
  class ConversationBot:
292
  def __init__(self):
293
  print("Initializing VisualChatGPT")
294
- self.edit = ImageEditing(device="cuda")
295
- self.i2t = ImageCaptioning(device="cuda")
296
- self.t2i = T2I(device="cuda")
297
  self.image2canny = image2canny()
298
- self.canny2image = canny2image(device="cuda")
299
- self.BLIPVQA = BLIPVQA(device="cuda")
300
- self.pix2pix = Pix2Pix(device="cuda")
301
  self.memory = ConversationBufferMemory(memory_key="chat_history", output_key='output')
302
  self.tools = [
303
  Tool(name="Get Photo Description", func=self.i2t.inference,
@@ -420,12 +420,12 @@ class ConversationBot:
420
 
421
  bot = ConversationBot()
422
  with gr.Blocks(css="#chatbot .overflow-y-auto{height:500px}") as demo:
423
- openai_api_key_input = gr.Textbox(type = "password", label = "Enter your OpenAI API key here")
424
- chatbot = gr.Chatbot(elem_id="chatbot", label="Visual ChatGPT")
425
- state = gr.State([])
426
-
427
 
428
  with gr.Row(visible = False) as input_row:
 
 
 
429
  with gr.Column(scale=0.7):
430
  txt = gr.Textbox(show_label=False, placeholder="Enter text and press enter, or upload an image").style(container=False)
431
  with gr.Column(scale=0.15, min_width=0):
 
291
  class ConversationBot:
292
  def __init__(self):
293
  print("Initializing VisualChatGPT")
294
+ self.edit = ImageEditing(device="cuda:0")
295
+ self.i2t = ImageCaptioning(device="cuda:0")
296
+ self.t2i = T2I(device="cuda:0")
297
  self.image2canny = image2canny()
298
+ self.canny2image = canny2image(device="cuda:0")
299
+ self.BLIPVQA = BLIPVQA(device="cuda:0")
300
+ self.pix2pix = Pix2Pix(device="cuda:0")
301
  self.memory = ConversationBufferMemory(memory_key="chat_history", output_key='output')
302
  self.tools = [
303
  Tool(name="Get Photo Description", func=self.i2t.inference,
 
420
 
421
  bot = ConversationBot()
422
  with gr.Blocks(css="#chatbot .overflow-y-auto{height:500px}") as demo:
423
+ openai_api_key_input = gr.Textbox(type = "password", label = "Enter your OpenAI API key here")
 
 
 
424
 
425
  with gr.Row(visible = False) as input_row:
426
+ chatbot = gr.Chatbot(elem_id="chatbot", label="Visual ChatGPT")
427
+ state = gr.State([])
428
+
429
  with gr.Column(scale=0.7):
430
  txt = gr.Textbox(show_label=False, placeholder="Enter text and press enter, or upload an image").style(container=False)
431
  with gr.Column(scale=0.15, min_width=0):