parthib07 commited on
Commit
b1c9e6b
Β·
verified Β·
1 Parent(s): adcd64b

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +1 -9
src/streamlit_app.py CHANGED
@@ -5,14 +5,12 @@ from paper import (
5
  run_task
6
  )
7
 
8
- # Page config
9
  st.set_page_config(
10
  page_title="πŸ“˜ Academic Research Assistant",
11
  layout="wide",
12
  initial_sidebar_state="expanded"
13
  )
14
 
15
- # App title
16
  st.title("πŸ“˜ Academic Research & Writing Assistant")
17
  st.markdown(
18
  """
@@ -21,7 +19,6 @@ st.markdown(
21
  """
22
  )
23
 
24
- # Sidebar task selection
25
  st.sidebar.header("πŸ”§ Task Selector")
26
  task_choice = st.sidebar.radio(
27
  "Select an academic task to perform:",
@@ -35,7 +32,6 @@ task_choice = st.sidebar.radio(
35
  ]
36
  )
37
 
38
- # Task mapping
39
  task_map = {
40
  "Literature Review": literature_research_task,
41
  "Generate Paper Outline": outline_task,
@@ -45,18 +41,15 @@ task_map = {
45
  "Ask Chatbot": chatbot_task,
46
  }
47
 
48
- # Inputs
49
  st.subheader("πŸ” Input Details")
50
 
51
  topic = st.text_input("Enter your research topic:", placeholder="e.g. Impact of AI in Healthcare")
52
  keywords = st.text_input("Enter related keywords (comma-separated):", placeholder="e.g. AI, healthcare, diagnosis")
53
 
54
- # Optional input for chatbot queries
55
  query = ""
56
  if task_choice == "Ask Chatbot":
57
  query = st.text_area("Ask your question:", placeholder="e.g. How to format a research abstract?")
58
 
59
- # Action button
60
  if st.button("πŸš€ Run Agent"):
61
  if not topic and task_choice != "Ask Chatbot":
62
  st.warning("Please enter a topic for the selected task.")
@@ -75,12 +68,11 @@ if st.button("πŸš€ Run Agent"):
75
  st.subheader("πŸ“„ Result")
76
  st.markdown(result, unsafe_allow_html=True)
77
 
78
- # Footer
79
  st.markdown(
80
  """
81
  <hr>
82
  <center>
83
- <small>Powered by LangChain + Gemini | Built by Academic AI</small>
84
  </center>
85
  """,
86
  unsafe_allow_html=True
 
5
  run_task
6
  )
7
 
 
8
  st.set_page_config(
9
  page_title="πŸ“˜ Academic Research Assistant",
10
  layout="wide",
11
  initial_sidebar_state="expanded"
12
  )
13
 
 
14
  st.title("πŸ“˜ Academic Research & Writing Assistant")
15
  st.markdown(
16
  """
 
19
  """
20
  )
21
 
 
22
  st.sidebar.header("πŸ”§ Task Selector")
23
  task_choice = st.sidebar.radio(
24
  "Select an academic task to perform:",
 
32
  ]
33
  )
34
 
 
35
  task_map = {
36
  "Literature Review": literature_research_task,
37
  "Generate Paper Outline": outline_task,
 
41
  "Ask Chatbot": chatbot_task,
42
  }
43
 
 
44
  st.subheader("πŸ” Input Details")
45
 
46
  topic = st.text_input("Enter your research topic:", placeholder="e.g. Impact of AI in Healthcare")
47
  keywords = st.text_input("Enter related keywords (comma-separated):", placeholder="e.g. AI, healthcare, diagnosis")
48
 
 
49
  query = ""
50
  if task_choice == "Ask Chatbot":
51
  query = st.text_area("Ask your question:", placeholder="e.g. How to format a research abstract?")
52
 
 
53
  if st.button("πŸš€ Run Agent"):
54
  if not topic and task_choice != "Ask Chatbot":
55
  st.warning("Please enter a topic for the selected task.")
 
68
  st.subheader("πŸ“„ Result")
69
  st.markdown(result, unsafe_allow_html=True)
70
 
 
71
  st.markdown(
72
  """
73
  <hr>
74
  <center>
75
+ <small>Built By Parthib</small>
76
  </center>
77
  """,
78
  unsafe_allow_html=True