Abs6187 commited on
Commit
302d80d
Β·
verified Β·
1 Parent(s): 0d65dd4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,16 +2,16 @@
2
  import gradio
3
  from transformers import pipeline
4
 
5
- import openai
6
  import gradio
7
 
8
- openai.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 = openai.ChatCompletion.create(
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
  )