Spaces:
Build error
Build error
RamAnanth1
commited on
Commit
·
592b027
1
Parent(s):
e9434f9
Update app.py
Browse files
app.py
CHANGED
@@ -300,31 +300,31 @@ class ConversationBot:
|
|
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,
|
304 |
-
|
305 |
-
|
306 |
Tool(name="Generate Image From User Input Text", func=self.t2i.inference,
|
307 |
description="useful when you want to generate an image from a user input text and save it to a file. like: generate an image of an object or something, or generate an image that includes some objects. "
|
308 |
"The input to this tool should be a string, representing the text used to generate image. "),
|
309 |
-
Tool(name="Remove Something From The Photo", func=self.edit.remove_part_of_image,
|
310 |
-
|
311 |
-
|
312 |
-
Tool(name="Replace Something From The Photo", func=self.edit.replace_part_of_image,
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
Tool(name="Instruct Image Using Text", func=self.pix2pix.inference,
|
317 |
-
|
318 |
-
|
319 |
-
Tool(name="Answer Question About The Image", func=self.BLIPVQA.get_answer_from_question_and_image,
|
320 |
-
|
321 |
-
|
322 |
Tool(name="Edge Detection On Image", func=self.image2canny.inference,
|
323 |
description="useful when you want to detect the edge of the image. like: detect the edges of this image, or canny detection on image, or peform edge detection on this image, or detect the canny image of this image. "
|
324 |
"The input to this tool should be a string, representing the image_path"),
|
325 |
-
Tool(name="Generate Image Condition On Canny Image", func=self.canny2image.inference,
|
326 |
-
|
327 |
-
|
328 |
#Tool(name="Line Detection On Image", func=self.image2line.inference,
|
329 |
#description="useful when you want to detect the straight line of the image. like: detect the straight lines of this image, or straight line detection on image, or peform straight line detection on this image, or detect the straight line image of this image. "
|
330 |
# "The input to this tool should be a string, representing the image_path"),
|
|
|
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,
|
304 |
+
# description="useful when you want to know what is inside the photo. receives image_path as input. "
|
305 |
+
# "The input to this tool should be a string, representing the image_path. "),
|
306 |
Tool(name="Generate Image From User Input Text", func=self.t2i.inference,
|
307 |
description="useful when you want to generate an image from a user input text and save it to a file. like: generate an image of an object or something, or generate an image that includes some objects. "
|
308 |
"The input to this tool should be a string, representing the text used to generate image. "),
|
309 |
+
#Tool(name="Remove Something From The Photo", func=self.edit.remove_part_of_image,
|
310 |
+
# description="useful when you want to remove and object or something from the photo from its description or location. "
|
311 |
+
# "The input to this tool should be a comma seperated string of two, representing the image_path and the object need to be removed. "),
|
312 |
+
#Tool(name="Replace Something From The Photo", func=self.edit.replace_part_of_image,
|
313 |
+
# description="useful when you want to replace an object from the object description or location with another object from its description. "
|
314 |
+
# "The input to this tool should be a comma seperated string of three, representing the image_path, the object to be replaced, the object to be replaced with "),
|
315 |
+
|
316 |
+
#Tool(name="Instruct Image Using Text", func=self.pix2pix.inference,
|
317 |
+
# description="useful when you want to the style of the image to be like the text. like: make it look like a painting. or make it like a robot. "
|
318 |
+
# "The input to this tool should be a comma seperated string of two, representing the image_path and the text. "),
|
319 |
+
#Tool(name="Answer Question About The Image", func=self.BLIPVQA.get_answer_from_question_and_image,
|
320 |
+
# description="useful when you need an answer for a question based on an image. like: what is the background color of the last image, how many cats in this figure, what is in this figure. "
|
321 |
+
# "The input to this tool should be a comma seperated string of two, representing the image_path and the question"),
|
322 |
Tool(name="Edge Detection On Image", func=self.image2canny.inference,
|
323 |
description="useful when you want to detect the edge of the image. like: detect the edges of this image, or canny detection on image, or peform edge detection on this image, or detect the canny image of this image. "
|
324 |
"The input to this tool should be a string, representing the image_path"),
|
325 |
+
#Tool(name="Generate Image Condition On Canny Image", func=self.canny2image.inference,
|
326 |
+
# description="useful when you want to generate a new real image from both the user desciption and a canny image. like: generate a real image of a object or something from this canny image, or generate a new real image of a object or something from this edge image. "
|
327 |
+
# "The input to this tool should be a comma seperated string of two, representing the image_path and the user description. "),
|
328 |
#Tool(name="Line Detection On Image", func=self.image2line.inference,
|
329 |
#description="useful when you want to detect the straight line of the image. like: detect the straight lines of this image, or straight line detection on image, or peform straight line detection on this image, or detect the straight line image of this image. "
|
330 |
# "The input to this tool should be a string, representing the image_path"),
|