Abhaykoul commited on
Commit
d835a50
β€’
1 Parent(s): ec1d4af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -16
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import streamlit as st
2
  import requests
3
  import time
4
-
5
  # Create a session for reusing connections
6
  session = requests.Session()
7
 
@@ -21,24 +20,24 @@ def chat_with_ai(message):
21
 
22
  # Streamlit app
23
  def main():
24
- st.set_page_config(page_title="AI Study Notes Generator", page_icon="logo.png", layout="wide")
25
-
26
  st.title("AI Study Notes Generator πŸ“š")
27
- st.image("logo.png", use_column_width=True) # Display a logo at the top
 
 
28
 
29
  # User inputs for class and topic
30
- user_class = st.selectbox('Select your class:', ['Class 1', 'Class 2', 'Class 3', 'Class 4', 'Class 5', 'Class 6',
31
- 'Class 7', 'Class 8', 'Class 9', 'Class 10', 'Class 11', 'Class 12'])
32
- user_input = st.text_input(f'Enter your study topic for {user_class}:', placeholder='e.g., Electron')
33
 
34
  # User selects the type of notes
35
- note_type = st.selectbox('Select the type of notes:', ['Detailed Explanation', 'Summary', 'Key Points'])
36
 
37
  # User selects the format of the notes
38
- note_format = st.selectbox('Select the format of the notes:', ['Text', 'Bulleted List', 'Numbered List'])
39
 
40
  # Generate study notes when prompted
41
- if st.button('Generate Study Notes'):
42
  if user_input.lower() in ['quit', 'exit', 'bye']:
43
  st.success("Goodbye! Have a great day!")
44
  else:
@@ -54,18 +53,18 @@ def main():
54
  st.markdown(response)
55
 
56
  # About section
57
- st.markdown("## About")
58
- st.markdown("This application uses AI to generate study notes based on the class and topic you provide. It's designed to help students get a quick overview of a topic. The application is made by Abhay Koul, also known as OEvortex, and it uses the API of HelpingAI, a company by OEvortex. You can learn more about OEvortex on YouTube.")
59
 
60
  # Footer
61
- st.markdown("---")
62
- st.markdown("Β© 2023 AI Study Notes Generator HelpingAI")
63
 
64
  # Main area
65
  st.markdown("---")
66
  st.markdown("## Welcome to the AI Study Notes Generator! πŸ“š")
67
- st.markdown("To get started, please select your class and enter your study topic. Then, choose the type and format of the notes you want to generate, and click 'Generate Study Notes'.")
68
  st.markdown("The AI will generate study notes based on your inputs and display them here. You can then use these notes to study and learn about your chosen topic. Happy studying! πŸš€")
69
 
70
  if __name__ == "__main__":
71
- main()
 
1
  import streamlit as st
2
  import requests
3
  import time
 
4
  # Create a session for reusing connections
5
  session = requests.Session()
6
 
 
20
 
21
  # Streamlit app
22
  def main():
 
 
23
  st.title("AI Study Notes Generator πŸ“š")
24
+ st.sidebar.image("logo.png", use_column_width=True) # Display a logo in the sidebar
25
+ st.sidebar.markdown("## Class Selection")
26
+ st.sidebar.markdown("Please select your class and enter the study topic.")
27
 
28
  # User inputs for class and topic
29
+ user_class = st.sidebar.selectbox('Select your class:', ['Class 1', 'Class 2', 'Class 3', 'Class 4', 'Class 5', 'Class 6',
30
+ 'Class 7', 'Class 8', 'Class 9', 'Class 10', 'Class 11', 'Class 12'])
31
+ user_input = st.sidebar.text_input(f'Enter your study topic for {user_class}:', placeholder='e.g., History')
32
 
33
  # User selects the type of notes
34
+ note_type = st.sidebar.selectbox('Select the type of notes:', ['Detailed Explanation', 'Summary', 'Key Points'])
35
 
36
  # User selects the format of the notes
37
+ note_format = st.sidebar.selectbox('Select the format of the notes:', ['Text', 'Bulleted List', 'Numbered List'])
38
 
39
  # Generate study notes when prompted
40
+ if st.sidebar.button('Generate Study Notes'):
41
  if user_input.lower() in ['quit', 'exit', 'bye']:
42
  st.success("Goodbye! Have a great day!")
43
  else:
 
53
  st.markdown(response)
54
 
55
  # About section
56
+ st.sidebar.markdown("## About")
57
+ st.sidebar.markdown("This application uses AI to generate study notes based on the class and topic you provide. It's designed to help students get a quick overview of a topic. The application is made by Abhay Koul, also known as OEvortex, and it uses the API of HelpingAI, a company by OEvortex. You can learn more about OEvortex on YouTube.")
58
 
59
  # Footer
60
+ st.sidebar.markdown("---")
61
+ st.sidebar.markdown("Β© 2023 AI Study Notes Generator by OEvortex, HelpingAI")
62
 
63
  # Main area
64
  st.markdown("---")
65
  st.markdown("## Welcome to the AI Study Notes Generator! πŸ“š")
66
+ st.markdown("To get started, please select your class and enter your study topic in the sidebar. Then, choose the type and format of the notes you want to generate, and click 'Generate Study Notes'.")
67
  st.markdown("The AI will generate study notes based on your inputs and display them here. You can then use these notes to study and learn about your chosen topic. Happy studying! πŸš€")
68
 
69
  if __name__ == "__main__":
70
+ main()