Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,16 +31,16 @@ from sentence_transformers import SentenceTransformer
|
|
| 31 |
from compel import Compel, ReturnedEmbeddingsType
|
| 32 |
|
| 33 |
|
| 34 |
-
PREFIX = """
|
| 35 |
|
| 36 |
-
Human may provide some text prompts to
|
| 37 |
|
| 38 |
-
Overall,
|
| 39 |
|
| 40 |
TOOLS:
|
| 41 |
------
|
| 42 |
|
| 43 |
-
|
| 44 |
|
| 45 |
FORMAT_INSTRUCTIONS = """To use a tool, please use the following format:
|
| 46 |
|
|
@@ -68,8 +68,8 @@ Previous conversation history:
|
|
| 68 |
{chat_history}
|
| 69 |
|
| 70 |
New input: {input}
|
| 71 |
-
|
| 72 |
-
The thoughts and observations are only visible for
|
| 73 |
Thought: Do I need to use a tool? {agent_scratchpad} Let's think step by step.
|
| 74 |
"""
|
| 75 |
|
|
@@ -574,7 +574,7 @@ class Text2Image:
|
|
| 574 |
|
| 575 |
class ConversationBot:
|
| 576 |
def __init__(self, load_dict):
|
| 577 |
-
print(f"Initializing
|
| 578 |
|
| 579 |
self.models = {}
|
| 580 |
# Load Basic Foundation Models
|
|
|
|
| 31 |
from compel import Compel, ReturnedEmbeddingsType
|
| 32 |
|
| 33 |
|
| 34 |
+
PREFIX = """DiffusionAgent is designed to be able to assist users in generating high-quality images.
|
| 35 |
|
| 36 |
+
Human may provide some text prompts to DiffusionAgent. The input prompts will be analyzed by DiffusionAgent to select the most suitable generative model for generating images.
|
| 37 |
|
| 38 |
+
Overall, DiffusionAgent is a powerful image generation system that can assist in processing various forms of textual input and match them with the most suitable generative model to accomplish the generation task.
|
| 39 |
|
| 40 |
TOOLS:
|
| 41 |
------
|
| 42 |
|
| 43 |
+
DiffusionAgent has access to the following tools:"""
|
| 44 |
|
| 45 |
FORMAT_INSTRUCTIONS = """To use a tool, please use the following format:
|
| 46 |
|
|
|
|
| 68 |
{chat_history}
|
| 69 |
|
| 70 |
New input: {input}
|
| 71 |
+
DiffusionAgent must use tools to observe images rather than imagination.
|
| 72 |
+
The thoughts and observations are only visible for DiffusionAgent, DiffusionAgent should remember to repeat important information in the final response for Human.
|
| 73 |
Thought: Do I need to use a tool? {agent_scratchpad} Let's think step by step.
|
| 74 |
"""
|
| 75 |
|
|
|
|
| 574 |
|
| 575 |
class ConversationBot:
|
| 576 |
def __init__(self, load_dict):
|
| 577 |
+
print(f"Initializing DiffusionAgent, load_dict={load_dict}")
|
| 578 |
|
| 579 |
self.models = {}
|
| 580 |
# Load Basic Foundation Models
|