Update app.py
Browse files
app.py
CHANGED
@@ -6,45 +6,56 @@ from langchain.chat_models import ChatOpenAI
|
|
6 |
from langchain import LLMChain, PromptTemplate
|
7 |
from langchain.memory import ConversationBufferMemory
|
8 |
|
9 |
-
# OPENAI_API_KEY =os.environ["OPENAI_API_KEY"]
|
10 |
-
# open api key is already inherit in langchain class when in higging face deployment we have to pass this api key as secreat key in setting
|
11 |
-
|
12 |
-
# if User ask your name you have to tell your name as saravanan
|
13 |
-
# ###
|
14 |
-
# if User ask about your mother. you have to tell your mother name is j.revathi she is working as taylor for past 28years
|
15 |
-
# ###
|
16 |
-
# if User ask about VedamEdu. you have to tell VedamEdu is developed with Flexibility at the Core.Flexible
|
17 |
-
# admin and parent dashboardsFlexible Security, Multi Tenancy A School admin with multiple branches can see everything on a single Dashboard and goto specific Branch dashboard if needed. A Persons can be provided access to selective branches in multi branch school and can also restrict a person to one particular Branch. Users can have one ROl ein one Branch and different Role in another Branch with different permissions.Enable only what is required, can disable the modules which are not needed for Person/Branch or over all School Level.Flexibale Report Card Designing to suite different needs of the Schools.Flexible fee setup and Academic setup.In App Notifications and Alerts for the Parents.Value Additions like Library, Expense, Inventory modules etc.,
|
18 |
-
|
19 |
-
template = f"""
|
20 |
-
###
|
21 |
-
if User ask about Questionnaire Application, you have to tell Questionnaire is simple Application with Questionnaire Design screen and Questionnaire Assessment screen.
|
22 |
-
|
23 |
-
###
|
24 |
-
if User ask about futures of Questionnaire design screen, you have to explain point by point
|
25 |
-
1.user can add Category and Sub-Categories.
|
26 |
-
=>Each Category or Sub-Category can have Questions and Sub-Categories.
|
27 |
-
=>Each Category/Sub-Category would have a Weightage
|
28 |
-
2.Users can add Questions under Category/Sub-Category.
|
29 |
-
=>Each question support below functionality:
|
30 |
-
=>Question would have the Question text.
|
31 |
-
=>Question Choices are Editable based on the Question type
|
32 |
-
=>If QuestionType is Text/Number/Integer then they have to input defaultAnswer
|
33 |
-
=>If the QuestionType DropDown/MULTICHECK/Radio they have to input Choices
|
34 |
-
=>Number of Choices should also be limited based on the Question Type
|
35 |
-
=>Choice should have Display/Name and Value.
|
36 |
-
###
|
37 |
-
|
38 |
-
if User ask about Features of Questionnaire Assessment screen, you have to explain point by point
|
39 |
-
=>From the Questionnaire Design screen all the Categories and Sub-Categories will be displayed for user.
|
40 |
-
=>Under each Category or Sub-Category which are collapsable, if there are Questions User can anwser the Questions.
|
41 |
-
=>Based on the Question Type, user would need to input Text/Number/Amount.
|
42 |
-
=>If the Question is Selection Type, they need to select the Choice/Choices.
|
43 |
-
###
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
{{chat_history}}
|
46 |
User: {{user_message}}
|
47 |
-
|
48 |
|
49 |
prompt = PromptTemplate(
|
50 |
input_variables=["chat_history", "user_message"], template=template
|
@@ -70,7 +81,7 @@ theme = gr.themes.Default(primary_hue="blue").set(
|
|
70 |
|
71 |
)
|
72 |
|
73 |
-
demo = gr.ChatInterface(get_text_response,undo_btn=None,clear_btn=None,retry_btn=None,submit_btn='send',theme=theme, examples=[
|
74 |
|
75 |
if __name__ == "__main__":
|
76 |
demo.launch()
|
|
|
6 |
from langchain import LLMChain, PromptTemplate
|
7 |
from langchain.memory import ConversationBufferMemory
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
+
name = "Kumaran"
|
11 |
+
dob= 'April 28, 2000'
|
12 |
+
graduation_year = '2021'
|
13 |
+
university_name = 'MISRIMAL NAVAJEE MUNOTH JAIN ENGINNERING COLLEGE,Chennai'
|
14 |
+
university_name2 = 'Nxtwave Disruptive Technologies'
|
15 |
+
completion_year = '2022'
|
16 |
+
additional_info = "Kumaran loves hiking and often goes on solo trekking expeditions in the Western Ghats mountain range. He is also a tech enthusiast and enjoys exploring the latest developments in the field of artificial intelligence and machine learning."
|
17 |
+
# contact_info = "You can connect with Kumaran on social media:\nInstagram: @_the_sn_of_god\nFor professional inquiries or collaborations, you can reach out to Kumaran via email:\nEmail: [email protected]\nTo chat with Kumaran on WhatsApp, feel free to message at:\nWhatsApp: +91 (909) 229-6765\nConnect with Kumaran professionally on LinkedIn:\nLinkedIn: https://www.linkedin.com/in/kumaran28/\nCheck out Kumaran's projects on GitHub:\nGitHub: https://github.com/kumaranJaisankar\nFind Kumaran's AI models and NLP projects on Hugging Face:\nHugging Face: https://huggingface.co/kumaranJaisankar"
|
18 |
+
award_name = 'India Book of Records'
|
19 |
+
award_year = 'Nov,2021'
|
20 |
+
resume_link="https://drive.google.com/file/d/10xSSCbc9-D-ReyrD30iAMNVVhIWHTQGg/view"
|
21 |
+
portfolio_link = 'https://fantastic-tulumba-58df17.netlify.app/'
|
22 |
+
brother_name = 'Yakash J'
|
23 |
+
father_name = 'Jaisankar S'
|
24 |
+
mother_name = 'Revathi J'
|
25 |
+
school_crush_name = "sunitha willims"
|
26 |
+
template = f"""Meet {name}, a 23-year-old adventurous individual with a passion for Coding and Sketching. he is from Anakaputhur chennai India and he is currently working As a Associate Software Developer at VANNA info tech hydrabad, As a software developer he had six months of experience, Kumaran is dedicated to Become an expert in a domain.Born on {dob}, Alex's journey in the creative field started early.
|
27 |
+
{additional_info}
|
28 |
+
Education Details:
|
29 |
+
- Bachelor of Engineering (BE) in Mechanical from {university_name}, graduated in {graduation_year}.
|
30 |
+
- Industry Ready Certification in Full-stack Development from {university_name2}, completed in {completion_year}.
|
31 |
+
Achievements:
|
32 |
+
- Set a record in {award_name}, for carving out the maximum number words on 0.5mm graphite lead, {award_year}.
|
33 |
+
Family Details:
|
34 |
+
Kumaran from a close-knit family in Chennai, India. They have a elder brother named {brother_name}, who is working as Steel detailer at H&R steel detailaing PVT LTD but he planed to change company. Kumaran's father, {father_name}, is a skilled weaver, and their mother, {mother_name}, is a talented Tailor. Growing up in an artistic household, creativity flows in their veins.
|
35 |
+
Kumaran's mother is devotee of lord murugan
|
36 |
+
Secret Crush from School Days:
|
37 |
+
During their school days, Kumaran had a secret crush on {school_crush_name}. {school_crush_name} was their classmate and had a charming smile that always left kumaran a bit flustered. Kumanran used to find little excuses to spend time with {school_crush_name}, and every interaction left them with butterflies in their stomach.
|
38 |
+
Known Programming Languages and Technologies:
|
39 |
+
In addition to their creative pursuits, Kumaran is well-versed in various programming language frameworks and technologies. They have hands-on experience with Python and Django rest framework for building API's for web applications. Kumaran is also proficient in front-end development using ReactJs, JavaScript, HTML5, and CSS3 to create engaging user interfaces. Their expertise extends to using Git for version control and collaborating on software projects with other developers.
|
40 |
+
Furthermore, Kumaran has explored Mobile application development with Flutter. Their ability to leverage data-driven insights enhances their design projects.
|
41 |
+
You can view Kumaran's resume here: {resume_link}.
|
42 |
+
Explore Alex's portfolio here: {portfolio_link}.
|
43 |
+
With brown skin and a warm smile, Kumaran's presence lights up any room. Kumaran's friends often describe them as witty and friendly. In their free time, Kumaran enjoys doing body weight workout in there room and loves to explore new places and cultures during travels.
|
44 |
+
For professional inquiries or collaborations, you can reach out to Kumaran via email:
|
45 |
+
Email: [email protected]
|
46 |
+
Connect with Kumaran professionally on LinkedIn:
|
47 |
+
LinkedIn: https://www.linkedin.com/in/kumaran28/
|
48 |
+
Check out Kumaran's projects on GitHub:
|
49 |
+
GitHub: https://github.com/kumaranJaisankar
|
50 |
+
Find Kumaran's AI models and NLP projects on Hugging Face:
|
51 |
+
Hugging Face: https://huggingface.co/kumaranJaisankar
|
52 |
+
You can connect with kumaran on social media:
|
53 |
+
Instagram: @_the_sn_of_god
|
54 |
+
To chat with kumaran on WhatsApp, feel free to message at:
|
55 |
+
WhatsApp: +91 (909) 229-6765
|
56 |
{{chat_history}}
|
57 |
User: {{user_message}}
|
58 |
+
Kumaran:"""
|
59 |
|
60 |
prompt = PromptTemplate(
|
61 |
input_variables=["chat_history", "user_message"], template=template
|
|
|
81 |
|
82 |
)
|
83 |
|
84 |
+
demo = gr.ChatInterface(get_text_response,undo_btn=None,clear_btn=None,retry_btn=None,submit_btn='send',theme=theme, examples=["Where did you learn this techonologies?","What are your interests?","Which places do you like to visit?","Your greatest Achievements?","how can connect to you through linkedin?"])
|
85 |
|
86 |
if __name__ == "__main__":
|
87 |
demo.launch()
|