Spaces:
Sleeping
Sleeping
gordonhubackup
commited on
Commit
•
c40d27f
1
Parent(s):
140efa3
fix
Browse files- app.py +2 -2
- conversation.py → llava/chat.py +1 -1
app.py
CHANGED
@@ -32,7 +32,7 @@ from PIL import Image
|
|
32 |
from io import BytesIO
|
33 |
import re
|
34 |
|
35 |
-
from .
|
36 |
|
37 |
# imports modules for registration
|
38 |
|
@@ -116,7 +116,7 @@ def gradio_answer(chatbot, chat_state, img_list, num_beams, temperature, num_vis
|
|
116 |
title = """<h1 align="center">Demo of MQT-LLaVA</h1>"""
|
117 |
description = """<h3>This is the demo of MQT-LLaVA. Upload your images and start chatting!. <br> To use
|
118 |
example questions, click example image, hit upload, and press enter in the chatbox.</h3>"""
|
119 |
-
article = """<p><a href='https://github.com/gordonhu608/MQT-LLaVA'><img src='https://img.shields.io/badge/Github-Code-blue'></a></p><p><a href='https://arxiv.org/abs/'><img src='https://img.shields.io/badge/Paper-ArXiv-red'></a></p>
|
120 |
"""
|
121 |
|
122 |
#TODO show examples below
|
|
|
32 |
from io import BytesIO
|
33 |
import re
|
34 |
|
35 |
+
from llava.chat import Chat, conv_llava_v1
|
36 |
|
37 |
# imports modules for registration
|
38 |
|
|
|
116 |
title = """<h1 align="center">Demo of MQT-LLaVA</h1>"""
|
117 |
description = """<h3>This is the demo of MQT-LLaVA. Upload your images and start chatting!. <br> To use
|
118 |
example questions, click example image, hit upload, and press enter in the chatbox.</h3>"""
|
119 |
+
article = """<p><a href='https://gordonhu608.github.io/mqt-llava/'><img src='https://img.shields.io/badge/Project-Page-Green'></a></p><p><a href='https://github.com/gordonhu608/MQT-LLaVA'><img src='https://img.shields.io/badge/Github-Code-blue'></a></p><p><a href='https://arxiv.org/abs/'><img src='https://img.shields.io/badge/Paper-ArXiv-red'></a></p>
|
120 |
"""
|
121 |
|
122 |
#TODO show examples below
|
conversation.py → llava/chat.py
RENAMED
@@ -488,7 +488,7 @@ class Chat:
|
|
488 |
return output_text, ''
|
489 |
|
490 |
def upload_img(self, image, conv, img_list):
|
491 |
-
images = load_images(image)
|
492 |
# if isinstance(image, str): # is a image path
|
493 |
# raw_image = Image.open(image).convert('RGB')
|
494 |
# image = self.vis_processor(raw_image).unsqueeze(0).to(self.device)
|
|
|
488 |
return output_text, ''
|
489 |
|
490 |
def upload_img(self, image, conv, img_list):
|
491 |
+
images = load_images([image])
|
492 |
# if isinstance(image, str): # is a image path
|
493 |
# raw_image = Image.open(image).convert('RGB')
|
494 |
# image = self.vis_processor(raw_image).unsqueeze(0).to(self.device)
|