Update app.py
Browse files
app.py
CHANGED
@@ -15,32 +15,9 @@ roles = {
|
|
15 |
# Streamlit UI
|
16 |
st.title("AI Role Selector")
|
17 |
|
18 |
-
Roles='''
|
19 |
-
1. 📝 Writing
|
20 |
-
What it means: This role is about creating text or stories. AI can help write essays, stories, or even poems!
|
21 |
-
2. 🎭 Roleplay
|
22 |
-
What it means: Just like playing pretend, AI can pretend to be someone or something else to understand situations better.
|
23 |
-
3. 🔍 Extraction
|
24 |
-
What it means: Extraction is like a treasure hunt! It's about pulling out special pieces of information from a big pile.
|
25 |
-
4. ➕ Math
|
26 |
-
What it means: This is all about numbers, calculations, and solving math problems.
|
27 |
-
5. 💻 Coding
|
28 |
-
What it means: Coding is giving instructions to the computer. It's like teaching it a new trick!
|
29 |
-
6. 🤔 Reasoning
|
30 |
-
What it means: Reasoning is about thinking things through, like solving a puzzle or mystery.
|
31 |
-
7. 🔬 STEM
|
32 |
-
What it means: STEM stands for Science, Technology, Engineering, and Math. It's all about exploring, building, and discovering!
|
33 |
-
8. 📚 Humanities
|
34 |
-
What it means: Humanities is about understanding people, cultures, and stories. It's like traveling back in time!
|
35 |
-
|
36 |
-
'''
|
37 |
-
|
38 |
# Dropdown to select role
|
39 |
selected_role = st.selectbox("Select AI Role:", list(roles.keys()))
|
40 |
|
41 |
-
# Slider to adjust sampling temperature
|
42 |
-
temperature = st.slider("Adjust Sampling Temperature:", 0.0, 1.0, temperature_config[selected_role.split(' ')[0].lower()])
|
43 |
-
|
44 |
# Switch to choose between two models
|
45 |
model = st.radio("Choose Model:", ["model_1", "model_2"])
|
46 |
|
@@ -49,7 +26,7 @@ user_input = st.text_area("Provide your task/question:")
|
|
49 |
|
50 |
# Button to execute
|
51 |
if st.button("Execute"):
|
52 |
-
# Here, you would add code to get the AI response based on the selected role
|
53 |
# For now, just echoing the user input.
|
54 |
st.write(f"You said: {user_input}")
|
55 |
|
|
|
15 |
# Streamlit UI
|
16 |
st.title("AI Role Selector")
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
# Dropdown to select role
|
19 |
selected_role = st.selectbox("Select AI Role:", list(roles.keys()))
|
20 |
|
|
|
|
|
|
|
21 |
# Switch to choose between two models
|
22 |
model = st.radio("Choose Model:", ["model_1", "model_2"])
|
23 |
|
|
|
26 |
|
27 |
# Button to execute
|
28 |
if st.button("Execute"):
|
29 |
+
# Here, you would add code to get the AI response based on the selected role and model.
|
30 |
# For now, just echoing the user input.
|
31 |
st.write(f"You said: {user_input}")
|
32 |
|