Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,13 +3,13 @@ import streamlit as st
|
|
| 3 |
from langchain_community.llms import OpenAI
|
| 4 |
|
| 5 |
|
| 6 |
-
st.title("🔗
|
| 7 |
|
| 8 |
-
def
|
| 9 |
# Enhanced prompt with additional context for better post generation
|
| 10 |
prompt = (
|
| 11 |
-
f"
|
| 12 |
-
|
| 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
|
| 21 |
-
submitted = st.form_submit_button("Generate
|
| 22 |
if submitted and topic:
|
| 23 |
-
post =
|
| 24 |
st.info(post)
|
| 25 |
elif submitted and not topic:
|
| 26 |
-
st.error("Please enter a technology to generate
|
|
|
|
| 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.")
|