Anisha0201 commited on
Commit
5a13860
·
verified ·
1 Parent(s): b3453aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -3,13 +3,13 @@ import streamlit as st
3
  from langchain_community.llms import OpenAI
4
 
5
 
6
- st.title("🔗 Roadmap Generator")
7
 
8
- def generate_roadmap_prompt(topic):
9
  # Enhanced prompt with additional context for better post generation
10
  prompt = (
11
- f" Create a structured roadmap for {topic} technology, categorizing it into three levels: beginner, intermediate, and advanced."
12
- "Outline key learning objectives, milestones, and skill progression for each level to guide learners in their {topic} development journey."
13
  )
14
 
15
  llm = OpenAI(temperature=0.7, openai_api_key=st.secrets["OPENAI_API_KEY"])
@@ -17,10 +17,10 @@ def generate_roadmap_prompt(topic):
17
  return response
18
 
19
  with st.form("my_form"):
20
- topic = st.text_area("Enter the Technology you want to learn.")
21
- submitted = st.form_submit_button("Generate Roadmap")
22
  if submitted and topic:
23
- post = generate_roadmap_prompt(topic)
24
  st.info(post)
25
  elif submitted and not topic:
26
- st.error("Please enter a technology to generate roadmap.")
 
3
  from langchain_community.llms import OpenAI
4
 
5
 
6
+ st.title("🔗 Test Creator")
7
 
8
+ def test_creator(topic):
9
  # Enhanced prompt with additional context for better post generation
10
  prompt = (
11
+ f" Develop a test to identify the modules you need to learn to become a {topic} developer."
12
+ "The test should assess your understanding and proficiency in these areas to provide guidance on which modules to focus on for further learning in {topic} development."
13
  )
14
 
15
  llm = OpenAI(temperature=0.7, openai_api_key=st.secrets["OPENAI_API_KEY"])
 
17
  return response
18
 
19
  with st.form("my_form"):
20
+ topic = st.text_area("Enter the Technology you want to test.")
21
+ submitted = st.form_submit_button("Generate Test")
22
  if submitted and topic:
23
+ post = test_creator(topic)
24
  st.info(post)
25
  elif submitted and not topic:
26
+ st.error("Please enter a technology to generate test.")