Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,7 @@ import time
|
|
8 |
from PIL import Image
|
9 |
from streamlit_image_comparison import image_comparison
|
10 |
import numpy as np
|
|
|
11 |
#import chromadb
|
12 |
|
13 |
from textwrap import dedent
|
@@ -42,6 +43,14 @@ gemini_llm = GoogleGenerativeAI(model="gemini-pro", google_api_key=GOOGLE_AI_STU
|
|
42 |
|
43 |
# CrewAI ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
def crewai_process_gemini(research_topic):
|
47 |
# Define your agents with roles and goals
|
@@ -81,30 +90,11 @@ def crewai_process_gemini(research_topic):
|
|
81 |
return result
|
82 |
|
83 |
|
84 |
-
|
85 |
-
|
86 |
-
# Tool import
|
87 |
-
from crewai.tools.gemini_tools import GeminiSearchTools
|
88 |
-
from crewai.tools.mixtral_tools import MixtralSearchTools
|
89 |
-
from crewai.tools.zephyr_tools import ZephyrSearchTools
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
st.set_page_config(layout="wide")
|
96 |
|
97 |
|
98 |
# Animation Code +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
99 |
|
100 |
-
# Set up the duration for your animation
|
101 |
-
t0=0 # [hrs]
|
102 |
-
t_end=2 # [hrs]
|
103 |
-
dt=0.005 # [hrs]
|
104 |
-
# Create array for time
|
105 |
-
t=np.arange(t0,t_end+dt,dt)
|
106 |
-
frame_amount=len(t)
|
107 |
-
|
108 |
|
109 |
# Subplot 1
|
110 |
fig2=plt.figure(figsize=(16,9),dpi=120,facecolor=(0.8,0.8,0.8))
|
@@ -172,6 +162,13 @@ a Custom GPT called Green Data City to create the design.
|
|
172 |
To interact with the Green Data City design tool click the button below.
|
173 |
"""
|
174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
# Function to draw the grid with optional highlighting
|
176 |
|
177 |
def draw_grid(data, highlight_coords=None):
|
|
|
8 |
from PIL import Image
|
9 |
from streamlit_image_comparison import image_comparison
|
10 |
import numpy as np
|
11 |
+
import re
|
12 |
#import chromadb
|
13 |
|
14 |
from textwrap import dedent
|
|
|
43 |
|
44 |
# CrewAI ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
45 |
|
46 |
+
# Tool import
|
47 |
+
from crewai.tools.gemini_tools import GeminiSearchTools
|
48 |
+
from crewai.tools.mixtral_tools import MixtralSearchTools
|
49 |
+
from crewai.tools.zephyr_tools import ZephyrSearchTools
|
50 |
+
from crewai.tools.phi2_tools import Phi2SearchTools
|
51 |
+
|
52 |
+
from crewai import Agent, Task, Crew, Process
|
53 |
+
|
54 |
|
55 |
def crewai_process_gemini(research_topic):
|
56 |
# Define your agents with roles and goals
|
|
|
90 |
return result
|
91 |
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
st.set_page_config(layout="wide")
|
94 |
|
95 |
|
96 |
# Animation Code +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
# Subplot 1
|
100 |
fig2=plt.figure(figsize=(16,9),dpi=120,facecolor=(0.8,0.8,0.8))
|
|
|
162 |
To interact with the Green Data City design tool click the button below.
|
163 |
"""
|
164 |
|
165 |
+
|
166 |
+
oai_client.embeddings.create(
|
167 |
+
model="text-embedding-ada-002",
|
168 |
+
input=text_intro
|
169 |
+
)
|
170 |
+
|
171 |
+
|
172 |
# Function to draw the grid with optional highlighting
|
173 |
|
174 |
def draw_grid(data, highlight_coords=None):
|