Spaces:
Running
Running
Commit
•
b9ba8ee
1
Parent(s):
580b1d6
Update app.py
Browse filesadded product description
app.py
CHANGED
@@ -11,7 +11,7 @@ genai.configure(api_key=os.getenv('GOOGLE_API_KEY'))
|
|
11 |
def get_gemini_response(diff,topic,material):
|
12 |
prompt = f"""You are an expert teaching AI model with advanced knowledge of all programming languages.
|
13 |
Your task is to generate 10 open-ended questions of {diff} difficulty on the topic:{topic}.
|
14 |
-
The answer to these questions must be present in the following: {material}
|
15 |
|
16 |
<MESSAGE>:|"rate your responses on a scale on 1-10 based on your knowledge. if score is less than 4 generate
|
17 |
a new response. do not display the rating." """
|
@@ -21,7 +21,52 @@ def get_gemini_response(diff,topic,material):
|
|
21 |
return response.text
|
22 |
|
23 |
|
24 |
-
st.set_page_config(page_title="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
col1,col2,col3=st.columns(3)
|
27 |
with col1:
|
@@ -32,12 +77,13 @@ with col2:
|
|
32 |
st.subheader("Enter Topic")
|
33 |
topic=st.text_input("Enter topic of interest:")
|
34 |
|
35 |
-
with col3:
|
36 |
-
|
37 |
-
|
|
|
|
|
38 |
text=""
|
39 |
if material is not None:
|
40 |
-
# text=''
|
41 |
reader=PdfReader(material)
|
42 |
for page in reader.pages:
|
43 |
text+=page.extract_text()
|
@@ -45,3 +91,10 @@ if st.button("generate"):
|
|
45 |
response=get_gemini_response(diff,topic,text)
|
46 |
print(response)
|
47 |
st.write(response)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
def get_gemini_response(diff,topic,material):
|
12 |
prompt = f"""You are an expert teaching AI model with advanced knowledge of all programming languages.
|
13 |
Your task is to generate 10 open-ended questions of {diff} difficulty on the topic:{topic}.
|
14 |
+
The answer to these questions must be present in the following: {material}. If the topic is not available in the provided material return "information not available"\n\n
|
15 |
|
16 |
<MESSAGE>:|"rate your responses on a scale on 1-10 based on your knowledge. if score is less than 4 generate
|
17 |
a new response. do not display the rating." """
|
|
|
21 |
return response.text
|
22 |
|
23 |
|
24 |
+
st.set_page_config(page_title="StudyMate")
|
25 |
+
st.header("PRODUCT DESCRIPTION----->",divider='orange')
|
26 |
+
st.markdown('''
|
27 |
+
Introducing **StudyMate** - Your Personalized Learning Companion
|
28 |
+
|
29 |
+
Are you tired of monotonous study routines? Do you wish to engage in more meaningful and thought-provoking learning experiences? Look no further! **StudyMate** is here to revolutionize your study sessions.
|
30 |
+
|
31 |
+
**StudyMate** is a cutting-edge Web application designed to enhance your learning journey by generating tailor-made open-ended questions based on your study material, difficulty level, and topics of interest. Whether you're a student preparing for exams or a lifelong learner seeking intellectual stimulation, **StudyMate** caters to your unique needs.
|
32 |
+
|
33 |
+
Key Features:
|
34 |
+
|
35 |
+
1. Seamless PDF Integration: Simply upload your study material in PDF format, and **StudyMate** will extract the relevant content to create insightful questions.
|
36 |
+
|
37 |
+
2. Customizable Difficulty Levels: Choose from a range of difficulty levels, including easy, medium, and challenging, to suit your learning pace and preferences.
|
38 |
+
|
39 |
+
3. Topic Selection: Select your preferred topics from a diverse range of subjects, ensuring that the generated questions align with your interests and curriculum requirements.
|
40 |
+
|
41 |
+
4. Dynamic Question Generation: Utilizing advanced algorithms and natural language processing techniques, **StudyMate** generates open-ended questions that promote critical thinking, comprehension, and deeper understanding of the subject matter.
|
42 |
+
|
43 |
+
5. Personalized Learning Experience: Receive a curated list of questions tailored specifically to your input, allowing you to focus on areas of strength or areas requiring further exploration.
|
44 |
+
|
45 |
+
6. Interactive Study Sessions: Engage in stimulating study sessions by pondering over thought-provoking questions that encourage analytical reasoning and conceptual mastery.
|
46 |
+
|
47 |
+
7. Progress Tracking: Monitor your progress and performance over time, allowing you to identify areas of improvement and track your academic growth.
|
48 |
+
|
49 |
+
How It Works:
|
50 |
+
|
51 |
+
1. Upload your study material in PDF format.
|
52 |
+
2. Select the desired difficulty level and topics of interest.
|
53 |
+
3. Sit back and let **StudyMate** analyze your input to generate customized open-ended questions.
|
54 |
+
4. Dive into a transformative learning experience as you explore and reflect upon the generated questions.
|
55 |
+
5. Review your progress and continue your learning journey with newfound insights and knowledge.
|
56 |
+
6. Experience the power of personalized learning with **StudyMate**. Embark on a quest for knowledge like never before!
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
|
61 |
+
|
62 |
+
|
63 |
+
|
64 |
+
''')
|
65 |
+
|
66 |
+
|
67 |
+
|
68 |
+
st.subheader("",divider='orange')
|
69 |
+
|
70 |
|
71 |
col1,col2,col3=st.columns(3)
|
72 |
with col1:
|
|
|
77 |
st.subheader("Enter Topic")
|
78 |
topic=st.text_input("Enter topic of interest:")
|
79 |
|
80 |
+
# with col3:
|
81 |
+
st.subheader("upload study material(*PDF only*):")
|
82 |
+
material=st.file_uploader('upload file:',type="pdf")
|
83 |
+
|
84 |
+
|
85 |
text=""
|
86 |
if material is not None:
|
|
|
87 |
reader=PdfReader(material)
|
88 |
for page in reader.pages:
|
89 |
text+=page.extract_text()
|
|
|
91 |
response=get_gemini_response(diff,topic,text)
|
92 |
print(response)
|
93 |
st.write(response)
|
94 |
+
|
95 |
+
|
96 |
+
st.text("")
|
97 |
+
st.text("")
|
98 |
+
st.text("")
|
99 |
+
st.text("")
|
100 |
+
st.text("NOTE:- If the page gives an error while generation. Kindly reload.")
|