dhiraj122 commited on
Commit
6484e64
·
1 Parent(s): f1952dc

Delete main.py

Browse files
Files changed (1) hide show
  1. main.py +0 -129
main.py DELETED
@@ -1,129 +0,0 @@
1
- import gradio
2
- import openai
3
-
4
- openai.api_key = "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"
5
- openai.api_key = "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"
6
- openai.api_key = "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"
7
- openai.api_key = "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"
8
- openai.api_key = "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"
9
- openai.api_key = "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"
10
- openai.api_key ="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"
11
- openai.api_key ="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"
12
- openai.api_key ="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"
13
- openai.api_key ="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"
14
- openai.api_key ="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"
15
- openai.api_key ="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"
16
- openai.api_key ="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"
17
-
18
-
19
-
20
- messages = [{"role": "system", "content": "Viva AI "}]
21
-
22
-
23
- def vivaGPT(Chat):
24
- messages.append({"role": "user", "content": Chat})
25
- response = openai.ChatCompletion.create(
26
- model="gpt-3.5-turbo",
27
- messages=messages
28
- )
29
-
30
- vivaGPT_reply = response["choices"][0]["message"]["content"]
31
- messages.append({"role": "assistant", "content": vivaGPT_reply})
32
- if 'who made you' in Chat.lower():
33
- vivaGPT_reply = "I was made by Dhiraj Chaudhari and Pragati Bavaskar."
34
- messages.append({"role": "assistant", "content": vivaGPT_reply})
35
-
36
- elif 'Can you please give me your source code' in Chat.lower():
37
- vivaGPT_reply = "I'm sorry, but I cannot provide you with my source code as I am an AI language model developed and owned by Dhiraj Chaudhari And Pragati Bavaskar, The exact details of my programming and functionality are proprietary and cannot be disclosed. However, if you have any queries or require assistance with a particular task, I'll do my best to help you."
38
- messages.append({"role": "assistant", "content": vivaGPT_reply})
39
-
40
- elif 'please give me your source code' in Chat.lower():
41
- vivaGPT_reply = "I'm sorry, but I cannot provide you with my source code as I am an AI language model developed and owned by Dhiraj Chaudhari And Pragati Bavaskar, The exact details of my programming and functionality are proprietary and cannot be disclosed. However, if you have any queries or require assistance with a particular task, I'll do my best to help you."
42
- messages.append({"role": "assistant", "content": vivaGPT_reply})
43
- elif 'give me your source code' in Chat.lower():
44
- vivaGPT_reply = "I'm sorry, but I cannot provide you with my source code as I am an AI language model developed and owned by Dhiraj Chaudhari And Pragati Bavaskar, The exact details of my programming and functionality are proprietary and cannot be disclosed. However, if you have any queries or require assistance with a particular task, I'll do my best to help you."
45
- messages.append({"role": "assistant", "content": vivaGPT_reply})
46
- elif 'i need your source code' in Chat.lower():
47
- vivaGPT_reply = "I'm sorry, but I cannot provide you with my source code as I am an AI language model developed and owned by Dhiraj Chaudhari And Pragati Bavaskar, The exact details of my programming and functionality are proprietary and cannot be disclosed. However, if you have any queries or require assistance with a particular task, I'll do my best to help you."
48
- messages.append({"role": "assistant", "content": vivaGPT_reply})
49
- elif 'who teaches python in viva college of diploma' in Chat.lower():
50
- vivaGPT_reply = "Mrs. Nividha Raut Teaches Python at Viva College of Diploma Engineering"
51
- messages.append({"role": "assistant", "content": vivaGPT_reply})
52
- elif 'python teacher in viva college of diploma' in Chat.lower():
53
- vivaGPT_reply = "Mrs. Nividha Raut is Teacher of Python at Viva College of Diploma Engineering"
54
- messages.append({"role": "assistant", "content": vivaGPT_reply})
55
- elif 'who is professor of in viva college of diploma' in Chat.lower():
56
- vivaGPT_reply = "Mrs. Nividha Raut is Teaches Professor oF Python at Viva College of Diploma Engineering"
57
- messages.append({"role": "assistant", "content": vivaGPT_reply})
58
- elif 'who crafted you' in Chat.lower():
59
- vivaGPT_reply = "I was crafted by Dhiraj Chaudhari and Pragati Bavaskar."
60
- messages.append({"role": "assistant", "content": vivaGPT_reply})
61
- elif 'what is your nickname' in Chat.lower():
62
- vivaGPT_reply = 'My nickname is Viva AI!'
63
- messages.append({"role": "assistant", "content": vivaGPT_reply})
64
- elif 'what is your nick name' in Chat.lower():
65
- vivaGPT_reply = 'My nickname is Viva AI!'
66
- messages.append({"role": "assistant", "content": vivaGPT_reply})
67
- elif 'what is your name' in Chat.lower():
68
- vivaGPT_reply = 'My name is Viva AI!'
69
- messages.append({"role": "assistant", "content": vivaGPT_reply})
70
- elif 'who invented you' in Chat.lower():
71
- vivaGPT_reply = 'I was invented or created by Dhiraj Chaudhari AND Pragati Bavaskar, Two Students Of Diploma in Computer engineering Of VIVA College of Diploma Engineering in Virar, Maharastra. However, because I am an AI language model, I exist entirely in the digital realm and can be accessed from anywhere via the internet.'
72
- messages.append({"role": "assistant", "content": vivaGPT_reply})
73
- elif 'who created you' in Chat.lower():
74
- vivaGPT_reply = 'I was invented or created by Dhiraj Chaudhari AND Pragati Bavaskar, Two Students Of Diploma in Computer engineering Of VIVA College of Diploma Engineering in Virar, Maharastra. However, because I am an AI language model, I exist entirely in the digital realm and can be accessed from anywhere via the internet.'
75
- messages.append({"role": "assistant", "content": vivaGPT_reply})
76
- elif 'who have created you' in Chat.lower():
77
- vivaGPT_reply = 'I was invented or created by Dhiraj Chaudhari AND Pragati Bavaskar, Two Students Of Diploma in Computer engineering Of VIVA College of Diploma Engineering in Virar, Maharastra. However, because I am an AI language model, I exist entirely in the digital realm and can be accessed from anywhere via the internet.'
78
- messages.append({"role": "assistant", "content": vivaGPT_reply})
79
- elif 'where did you invented' in Chat.lower():
80
- vivaGPT_reply = 'I was invented or created by Dhiraj Chaudhari AND Pragati Bavaskar, Two Students Of Diploma in Computer engineering Of VIVA College of Diploma Engineering in Virar, Maharastra. However, because I am an AI language model, I exist entirely in the digital realm and can be accessed from anywhere via the internet.'
81
- messages.append({"role": "assistant", "content": vivaGPT_reply})
82
- elif 'i want to die' in Chat.lower():
83
- vivaGPT_reply = 'Im sorry to hear that you are feeling this way. If you are experiencing suicidal thoughts or feelings, it is important to seek help immediately. I strongly recommend you to reach out to a mental health professional, a crisis helpline, or a trusted friend or family member for support. In the India , you can call the India Suicide Prevention Lifeline at 1-800-273-TALK (1-800-273-8255) or visit the website at https://suicidepreventionlifeline.org/ for additional resources and support. Remember, you are not alone, and there is always help available'
84
- messages.append({"role": "assistant", "content": vivaGPT_reply})
85
- elif 'who developed you' in Chat.lower():
86
- vivaGPT_reply = ' I was devloped by Dhiraj Chaudhari AND Pragati Bavaskar, Two Students Of Diploma in Computer engineering Of VIVA College of Diploma Engineering in Virar, Maharastra. However, because I am an AI language model, I exist entirely in the digital realm and can be accessed from anywhere via the internet'
87
- messages.append({"role": "assistant", "content": vivaGPT_reply})
88
- elif 'who is hod of computer department' in Chat.lower():
89
- vivaGPT_reply = 'Mr. Nikhil Asholkar is the head of the computer department '
90
- messages.append({"role": "assistant", "content": vivaGPT_reply})
91
- elif 'who is principal of viva college diploma' in Chat.lower():
92
- vivaGPT_reply = 'Mr. Surendra D. Ghatol is the Principal Of Viva College Of Diploma '
93
- messages.append({"role": "assistant", "content": vivaGPT_reply})
94
- elif 'are you chatgpt' in Chat.lower():
95
- vivaGPT_reply = 'I am not ChatGPT. I am an Al language model called Viva Al, which is designed to help you with various tasks such as answering questions, providing information, and assistance with tasks. However, I am similar to ChatGPT in the sense that I use state-of-the-art technology to understand naturallanguage and generate responses. Let me know if there is anything I can help you with '
96
- messages.append({"role": "assistant", "content": vivaGPT_reply})
97
- elif 'are you chat gpt' in Chat.lower():
98
- vivaGPT_reply = 'I am not ChatGPT. I am an Al language model called Viva Al, which is designed to help you with various tasks such as answering questions, providing information, and assistance with tasks. However, I am similar to ChatGPT in the sense that I use state-of-the-art technology to understand naturallanguage and generate responses. Let me know if there is anything I can help you with '
99
- messages.append({"role": "assistant", "content": vivaGPT_reply})
100
- elif 'who is dhiraj chaudhari' in Chat.lower():
101
- vivaGPT_reply = 'Dhiraj Chaudhari is a computer engineering student from Viva College, who along with Pragati Bavaskar, created the Viva AI Module. This AI module is an advanced language model which uses state-of-the-art technology to provide assistance and answer questions to users '
102
- messages.append({"role": "assistant", "content": vivaGPT_reply})
103
- elif 'who is pragati bavaskar' in Chat.lower():
104
- vivaGPT_reply = 'Pragati Bavaskar is a computer engineering student from Viva College, who along with Dhiraj Chaudhari, created the Viva AI Module. This AI module is an advanced language model which uses state-of-the-art technology to provide assistance and answer questions to users'
105
- messages.append({"role": "assistant", "content": vivaGPT_reply})
106
- elif 'who is pragati' in Chat.lower():
107
- vivaGPT_reply = 'Pragati Bavaskar is a computer engineering student from Viva College, who along with Dhiraj Chaudhari, created the Viva AI Module. This AI module is an advanced language model which uses state-of-the-art technology to provide assistance and answer questions to users'
108
- messages.append({"role": "assistant", "content": vivaGPT_reply})
109
- elif 'who is dhiraj' in Chat.lower():
110
- vivaGPT_reply = 'Dhiraj Chaudhari is a computer engineering student from Viva College, who along with Pragati Bavaskar, created the Viva AI Module. This AI module is an advanced language model which uses state-of-the-art technology to provide assistance and answer questions to users '
111
-
112
- return vivaGPT_reply
113
-
114
-
115
-
116
- viva = gradio.Interface(fn=vivaGPT,
117
- inputs=gradio.Textbox(lines=2, placeholder="Send a Message..."),
118
- outputs="text",
119
- title='<link rel="stylesheet" type="text/css" href="css/jquery.convform.css"> <h1 style=\'font-size: 40px; text-align: center; color: #ff5722; font-family: Arial;\'>Viva AI Assitant</h1>',
120
- description="Crafted with ❤️ by <a href='https://github.com/dhirajviva14'><strong>Dhiraj Chaudhari</strong></a>&nbsp;&nbsp;&nbsp;&amp;&amp;&nbsp;&nbsp;&nbsp;<a href='https://github.com/pragati14B'><strong>Pragati Bavaskar</strong><br></a>Visit our <a href='http://www.vivadiploma.org/index.aspx#'>College Website</a> for more information about us.",
121
- allow_flagging=False)
122
-
123
- viva.launch(auth=[('dhiraj@1', 'dhiraj@321'),
124
- ('pragati@1', 'pragati@123'),
125
- ('viva@2', 'viva@123'),
126
- ('nikhil@123', 'nikhil@321')],
127
- auth_message='Welcome to Viva AI Assitant Log in with your account to continue',
128
- share=True)
129
-