Abhaykoul commited on
Commit
71cce77
1 Parent(s): b4fac10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -8
app.py CHANGED
@@ -1,6 +1,5 @@
1
  import streamlit as st
2
  import requests
3
- import time
4
 
5
  # Create a session for reusing connections
6
  session = requests.Session()
@@ -32,14 +31,24 @@ def web_search(query):
32
 
33
  # Main function
34
  def main():
 
 
 
35
  query = st.text_input("Enter your research query: ")
36
- if query:
37
- # Perform web search
38
- search_results = web_search(query)
39
- # Pass the search results to the AI for generating a report
40
- report = chat_with_ai(search_results)
41
- # Display the report
42
- st.write(report)
 
 
 
 
 
 
 
43
 
44
  if __name__ == "__main__":
45
  main()
 
1
  import streamlit as st
2
  import requests
 
3
 
4
  # Create a session for reusing connections
5
  session = requests.Session()
 
31
 
32
  # Main function
33
  def main():
34
+ st.title("HelpingAI Research Assistant")
35
+ st.write("Hello! I am HelpingAI, developed by Abhay Koul. My purpose is to simplify your learning journey by providing personalized assistance, innovative teaching methods, and tailored resources to meet your unique needs. I am here to make your educational experience more enjoyable and effective. Feel free to ask me any questions or let me know how I can assist you in your learning adventure and in many more things from your life.")
36
+
37
  query = st.text_input("Enter your research query: ")
38
+
39
+ if st.button("Generate Report"):
40
+ if query:
41
+ # Perform web search
42
+ search_results = web_search(query)
43
+
44
+ # Pass the search results to the AI for generating a report
45
+ prompt = f"Generate a research report based on the following text: {search_results}"
46
+ report = chat_with_ai(prompt)
47
+
48
+ # Display the report
49
+ st.write(report)
50
+ else:
51
+ st.write("Please enter a research query.")
52
 
53
  if __name__ == "__main__":
54
  main()