Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ from parler_tts import ParlerTTSForConditionalGeneration
|
|
| 10 |
import soundfile as sf
|
| 11 |
from llama_index.core.agent import ReActAgent
|
| 12 |
from llama_index.core.tools import FunctionTool
|
| 13 |
-
from llama_index.
|
| 14 |
from PIL import Image
|
| 15 |
from tavily import TavilyClient
|
| 16 |
import requests
|
|
@@ -99,7 +99,7 @@ def handle_input(user_prompt, image=None, audio=None, websearch=False):
|
|
| 99 |
FunctionTool.from_defaults(fn=image_generation, name="Image Generation"),
|
| 100 |
]
|
| 101 |
|
| 102 |
-
llm =
|
| 103 |
agent = ReActAgent.from_tools(tools, llm=llm, verbose=True)
|
| 104 |
|
| 105 |
if image:
|
|
|
|
| 10 |
import soundfile as sf
|
| 11 |
from llama_index.core.agent import ReActAgent
|
| 12 |
from llama_index.core.tools import FunctionTool
|
| 13 |
+
from llama_index.llms.groq import Groq
|
| 14 |
from PIL import Image
|
| 15 |
from tavily import TavilyClient
|
| 16 |
import requests
|
|
|
|
| 99 |
FunctionTool.from_defaults(fn=image_generation, name="Image Generation"),
|
| 100 |
]
|
| 101 |
|
| 102 |
+
llm = Groq(model_name=MODEL, api_key=os.environ.get("GROQ_API_KEY"))
|
| 103 |
agent = ReActAgent.from_tools(tools, llm=llm, verbose=True)
|
| 104 |
|
| 105 |
if image:
|