awacke1's picture
Create app.py
586f060
raw
history blame
2.59 kB
import streamlit as st
# Define Roles and their Descriptions
roles = {
"Writing Expert": "πŸ“ Exhibits expertise in generating textual content and narratives.",
"Roleplay Expert": "🎭 Specialized in mimicking behaviors or characters.",
"Extraction Expert": "πŸ” Strictly sticks to facts and extracts concise information.",
"Mathematician": "βž— Solves mathematical problems with precision.",
"Coder": "πŸ’» Creates short python code functions to solve tasks.",
"Reasoning Expert": "πŸ€” Analyzes situations and provides logical solutions.",
"STEM Expert": "πŸ”¬ Specialized in Science, Technology, Engineering, and Mathematics tasks.",
"Humanities Expert": "πŸ“š Focuses on arts, literature, history, and other humanities subjects.",
}
# Streamlit UI
st.title("AI Role Selector")
Roles='''
1. πŸ“ Writing
What it means: This role is about creating text or stories. AI can help write essays, stories, or even poems!
2. 🎭 Roleplay
What it means: Just like playing pretend, AI can pretend to be someone or something else to understand situations better.
3. πŸ” Extraction
What it means: Extraction is like a treasure hunt! It's about pulling out special pieces of information from a big pile.
4. βž• Math
What it means: This is all about numbers, calculations, and solving math problems.
5. πŸ’» Coding
What it means: Coding is giving instructions to the computer. It's like teaching it a new trick!
6. πŸ€” Reasoning
What it means: Reasoning is about thinking things through, like solving a puzzle or mystery.
7. πŸ”¬ STEM
What it means: STEM stands for Science, Technology, Engineering, and Math. It's all about exploring, building, and discovering!
8. πŸ“š Humanities
What it means: Humanities is about understanding people, cultures, and stories. It's like traveling back in time!
'''
# Dropdown to select role
selected_role = st.selectbox("Select AI Role:", list(roles.keys()))
# Slider to adjust sampling temperature
temperature = st.slider("Adjust Sampling Temperature:", 0.0, 1.0, temperature_config[selected_role.split(' ')[0].lower()])
# Switch to choose between two models
model = st.radio("Choose Model:", ["model_1", "model_2"])
# Text area for user input
user_input = st.text_area("Provide your task/question:")
# Button to execute
if st.button("Execute"):
# Here, you would add code to get the AI response based on the selected role, temperature, and model.
# For now, just echoing the user input.
st.write(f"You said: {user_input}")
# Display the description of the selected role
st.write(roles[selected_role])