diff --git a/04b5d3.png b/04b5d3.png deleted file mode 100644 index bdb61a2a..00000000 Binary files a/04b5d3.png and /dev/null differ diff --git a/19c5c9.png b/19c5c9.png deleted file mode 100644 index 96e8aa84..00000000 Binary files a/19c5c9.png and /dev/null differ diff --git a/2d48a5.mp4 b/2d48a5.mp4 deleted file mode 100644 index 59d1bbb7..00000000 Binary files a/2d48a5.mp4 and /dev/null differ diff --git a/362fca.mp4 b/362fca.mp4 deleted file mode 100644 index f0007790..00000000 Binary files a/362fca.mp4 and /dev/null differ diff --git a/4ba95b.mp4 b/4ba95b.mp4 deleted file mode 100644 index 4b693d58..00000000 Binary files a/4ba95b.mp4 and /dev/null differ diff --git a/5d8afc.png b/5d8afc.png deleted file mode 100644 index de592dfd..00000000 Binary files a/5d8afc.png and /dev/null differ diff --git a/971de5.png b/971de5.png deleted file mode 100644 index 193f266b..00000000 Binary files a/971de5.png and /dev/null differ diff --git a/a822e9.png b/a822e9.png deleted file mode 100644 index 1afce1c5..00000000 Binary files a/a822e9.png and /dev/null differ diff --git a/ba23c2.png b/ba23c2.png deleted file mode 100644 index 762c53d7..00000000 Binary files a/ba23c2.png and /dev/null differ diff --git a/bcc056.png b/bcc056.png deleted file mode 100644 index 921e5dfc..00000000 Binary files a/bcc056.png and /dev/null differ diff --git a/dee5be.png b/dee5be.png deleted file mode 100644 index 01abeafb..00000000 Binary files a/dee5be.png and /dev/null differ diff --git a/e5acce.png b/e5acce.png deleted file mode 100644 index ca03f309..00000000 Binary files a/e5acce.png and /dev/null differ diff --git a/ea2fd3.png b/ea2fd3.png deleted file mode 100644 index 4cc1c33d..00000000 Binary files a/ea2fd3.png and /dev/null differ diff --git a/f101ae.png b/f101ae.png deleted file mode 100644 index cae29fea..00000000 Binary files a/f101ae.png and /dev/null differ diff --git a/flagged/log.csv b/flagged/log.csv deleted file mode 100644 index e3b52a9f..00000000 --- a/flagged/log.csv +++ /dev/null @@ -1,2 +0,0 @@ -Your Message,Chat History,flag,username,timestamp -hi,"

User: hi

Agent: As an AI, I need the details of the tasks executed and their results to provide a summary and response. Please provide the necessary information.

Agent: image

",,,2023-10-04 13:38:53.800487 diff --git a/swarmsui.py b/swarmsui.py deleted file mode 100644 index 21429b76..00000000 --- a/swarmsui.py +++ /dev/null @@ -1,89 +0,0 @@ -# Import required libraries -from gradio import Interface, Textbox, HTML, Blocks, Row, Column -import threading -import os -import glob -import base64 -from langchain.llms import OpenAIChat # Replace with your actual class -from swarms.agents import OmniModalAgent # Replace with your actual class - -# Function to convert image to base64 -def image_to_base64(image_path): - with open(image_path, "rb") as image_file: - return base64.b64encode(image_file.read()).decode() - -# Function to get the most recently created image in the directory -def get_latest_image(): - list_of_files = glob.glob('./*.png') - if not list_of_files: - return None - latest_file = max(list_of_files, key=os.path.getctime) - return latest_file - -# Initialize your OmniModalAgent -llm = OpenAIChat(model_name="gpt-4") -agent = OmniModalAgent(llm) - -# Global variable to store chat history -chat_history = [] - -# Function to update chat -def update_chat(user_input): - global chat_history - chat_history.append({"type": "user", "content": user_input}) - - agent_response = agent.run(user_input) - if not isinstance(agent_response, dict): - agent_response = {"type": "text", "content": str(agent_response)} - chat_history.append(agent_response) - - latest_image = get_latest_image() - if latest_image: - chat_history.append({"type": "image", "content": latest_image}) - - return render_chat(chat_history) - -# Function to render chat as HTML -def render_chat(chat_history): - chat_str = "
" - for message in chat_history: - if message['type'] == 'user': - chat_str += f"

User: {message['content']}

" - elif message['type'] == 'text': - chat_str += f"

Agent: {message['content']}

" - elif message['type'] == 'image': - img_path = os.path.join(".", message['content']) - base64_img = image_to_base64(img_path) - chat_str += f"

Agent: image

" - chat_str += "
" - return chat_str - -# Define layout using Blocks -with Blocks() as app_blocks: - with Row(): - with Column(): - chat_output = HTML(label="Chat History") - with Row(): - with Column(): - user_input = Textbox(label="Your Message", type="text") - -# Define Gradio interface -iface = Interface( - fn=update_chat, - inputs=user_input, - outputs=chat_output, - live=False, - layout=app_blocks -) - -# Function to update the chat display -def update_display(): - global chat_history - while True: - iface.update(render_chat(chat_history)) - -# Run the update_display function in a separate thread -threading.Thread(target=update_display).start() - -# Run Gradio interface -iface.launch()