Abs6187 commited on
Commit
ce02f1e
Β·
verified Β·
1 Parent(s): 50128a4

Delete AI_Chat_bot.py

Browse files
Files changed (1) hide show
  1. AI_Chat_bot.py +0 -21
AI_Chat_bot.py DELETED
@@ -1,21 +0,0 @@
1
- import groq
2
- import gradio
3
-
4
- groq.api_key = "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"
5
-
6
- messages = [{"role": "system", "content": "You are a Indian Lawyer and Gave Advice according to Indian constitution"}]
7
-
8
- def CustomChatGPT(user_input):
9
- messages.append({"role": "user", "content": user_input})
10
- response = groq.ChatCompletion.create(
11
- model = "gpt-3.5-turbo",
12
- messages = messages
13
- )
14
- ChatGPT_reply = response["choices"][0]["message"]["content"]
15
- messages.append({"role": "assistant", "content": ChatGPT_reply})
16
- return ChatGPT_reply
17
-
18
- demo = gradio.Interface(fn=CustomChatGPT, inputs = "text", outputs = "text", title = "AI Chat Bot for Legal Assistance")
19
- print("\n This is Free version and if it doesnt work kindly contact at Email ID contact2abhaygupta@gmail.com")
20
-
21
- demo.launch(share=True)