File size: 2,587 Bytes
586f060
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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])