Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,13 +2,11 @@ import os
|
|
2 |
import gradio as gr
|
3 |
from groq import Groq
|
4 |
|
5 |
-
|
6 |
client = Groq(
|
7 |
api_key=os.environ.get("GROQ_API_KEY"),
|
8 |
)
|
9 |
|
10 |
|
11 |
-
|
12 |
def chat_with_groq(user_input, additional_context=None):
|
13 |
chat_completion = client.chat.completions.create(
|
14 |
messages=[
|
@@ -24,7 +22,6 @@ def chat_with_groq(user_input, additional_context=None):
|
|
24 |
|
25 |
|
26 |
|
27 |
-
demo = gr.ChatInterface(fn=chat_with_groq,
|
28 |
-
|
29 |
if __name__ == "__main__":
|
30 |
demo.launch()
|
|
|
2 |
import gradio as gr
|
3 |
from groq import Groq
|
4 |
|
|
|
5 |
client = Groq(
|
6 |
api_key=os.environ.get("GROQ_API_KEY"),
|
7 |
)
|
8 |
|
9 |
|
|
|
10 |
def chat_with_groq(user_input, additional_context=None):
|
11 |
chat_completion = client.chat.completions.create(
|
12 |
messages=[
|
|
|
22 |
|
23 |
|
24 |
|
25 |
+
demo = gr.ChatInterface(fn=chat_with_groq, title="Echo Bot", description="This is a chatbot that can chat with you")
|
|
|
26 |
if __name__ == "__main__":
|
27 |
demo.launch()
|