Update app.py
Browse files
app.py
CHANGED
|
@@ -3,9 +3,14 @@ from langchain_core.prompts import ChatPromptTemplate
|
|
| 3 |
import gradio as gr
|
| 4 |
import os
|
| 5 |
|
|
|
|
| 6 |
|
| 7 |
-
llm =
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
prompt = ChatPromptTemplate.from_messages(
|
| 10 |
[
|
| 11 |
("system","Generate a list of synonyms for the following word, only give 5 words with examples."),
|
|
|
|
| 3 |
import gradio as gr
|
| 4 |
import os
|
| 5 |
|
| 6 |
+
groq_api_key = os.environ.get("GROQ_API_KEY")
|
| 7 |
|
| 8 |
+
llm = ChatGroq(
|
| 9 |
+
model="mixtral-8x7b-32768",
|
| 10 |
+
temperature=0.7,
|
| 11 |
+
api_key=groq_api_key,
|
| 12 |
+
verbose = False
|
| 13 |
+
)
|
| 14 |
prompt = ChatPromptTemplate.from_messages(
|
| 15 |
[
|
| 16 |
("system","Generate a list of synonyms for the following word, only give 5 words with examples."),
|