Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,16 +2,16 @@
|
|
2 |
import gradio
|
3 |
from transformers import pipeline
|
4 |
|
5 |
-
import
|
6 |
import gradio
|
7 |
|
8 |
-
|
9 |
|
10 |
messages = [{"role": "system", "content": "You are a Indian Lawyer and Gave Advice according to Indian constitution"}]
|
11 |
|
12 |
def CustomChatGPT(user_input):
|
13 |
messages.append({"role": "user", "content": user_input})
|
14 |
-
response =
|
15 |
model = "gpt-3.5-turbo",
|
16 |
messages = messages
|
17 |
)
|
|
|
2 |
import gradio
|
3 |
from transformers import pipeline
|
4 |
|
5 |
+
import groq
|
6 |
import gradio
|
7 |
|
8 |
+
groq.api_key = "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"
|
9 |
|
10 |
messages = [{"role": "system", "content": "You are a Indian Lawyer and Gave Advice according to Indian constitution"}]
|
11 |
|
12 |
def CustomChatGPT(user_input):
|
13 |
messages.append({"role": "user", "content": user_input})
|
14 |
+
response = groq.ChatCompletion.create(
|
15 |
model = "gpt-3.5-turbo",
|
16 |
messages = messages
|
17 |
)
|