Ankush05 commited on
Commit
b88db35
·
1 Parent(s): 5d4142d
Files changed (2) hide show
  1. app.py +3 -1
  2. knowledge.txt +40 -0
app.py CHANGED
@@ -11,8 +11,10 @@ from transformers import pipeline
11
 
12
  qna = pipeline("question-answering")
13
 
14
- knowledge = "My name is Ankush and I am excited to know about Artificial Intelligence"
 
15
 
 
16
  if query := st.chat_input("Question: "):
17
  ans = qna(question=query, context=knowledge)
18
  with st.chat_message("User"):
 
11
 
12
  qna = pipeline("question-answering")
13
 
14
+ with open("knowledge.txt", "r") as file:
15
+ data = file.read()
16
 
17
+ knowledge = data
18
  if query := st.chat_input("Question: "):
19
  ans = qna(question=query, context=knowledge)
20
  with st.chat_message("User"):
knowledge.txt ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ A person who has completely renounced attachment to the
2
+ fruits of all works, lives happily, neither performing nor directing any
3
+ action. (5.13) The Lord neither creates the urge for action, nor the
4
+ feeling of doership, nor the attachment to the results of action in
5
+ people. All these are done by the powers of Nature. (5.14) The
6
+ Lord does not take the responsibility for the good or evil deeds of
7
+ Bhagavad-Gita 15
8
+ anybody. The Self-knowledge becomes covered by the veil of ignorance; thereby people become deluded and do evil deeds. (5.15)
9
+ Spiritual knowledge destroys the ignorance of the Self and reveals
10
+ the Supreme, just as the Sun reveals the beauty of objects of the
11
+ world. (5.16) Persons whose mind and intellect are totally merged
12
+ with the Source, who are firmly devoted to the Source, who have
13
+ the Source as their supreme goal and sole refuge, and whose impurities are destroyed by the knowledge of the Source, do not take
14
+ birth again. (5.17)
15
+ Additional marks of an enlightened person
16
+ An enlightened person — by perceiving the Lord in all — looks
17
+ at a learned and humble priest, an outcast, even a cow, an elephant, or a dog with an equal eye. (5.18) Everything has been accomplished in this very life by the one whose mind is set in equality.
18
+ Such a person has realized God, because God is flawless and impartial. (5.19) One who neither rejoices on obtaining what is pleasant, nor grieves on obtaining the unpleasant, who has a steady
19
+ mind, who is undeluded, and who is a knower of the Supreme Being, such a person eternally abides with the Supreme Being. (5.20)
20
+ Such a person who is in union with the Supreme Being becomes
21
+ unattached to sensual pleasures by discovering the joy of the Self
22
+ through contemplation, and enjoys spiritual bliss. (5.21) Sensual
23
+ pleasures are, in truth, the source of misery, and have a beginning
24
+ and an end. Therefore, the wise do not rejoice sensual pleasures.
25
+ (5.22) One who is able to withstand the impulse of lust and anger
26
+ before death is a yogi, and a happy person. (5.23) One who finds
27
+ happiness with the Eternal Being, who rejoices Eternal Being
28
+ within, and who is illuminated by Self-knowledge; such a yogi attains Nirvana, and goes to Eternal Being. (5.24) Seers whose sins
29
+ (or imperfections) are destroyed, whose doubts have been dispelled by Self-knowledge, whose minds are disciplined, and who
30
+ are engaged in the welfare of all beings, attain the Supreme Being.
31
+ (5.25) They, who are free from lust and anger, who have subdued
32
+ the mind and senses, and who have known the Self, easily attain
33
+ Nirvana. (5.26)
34
+ Path of meditation and contemplation
35
+ A sage is liberated by renouncing all material enjoyments, focusing the eyes and the mind between the eye-brows, equalizing
36
+ the breath moving through the nostrils by using yogic techniques,
37
+ keeping the senses, mind, and intellect under control, having salvation as the prime goal, and by becoming free from lust, anger,
38
+ greed and fear. (5.27-28) My devotee attains peace by knowing
39
+ Me, the Supreme Being as the enjoyer of sacrifices and austerities,
40
+ as the great Lord of all the universe, and the friend of all beings.