hruday96 commited on
Commit
06b8de9
·
verified ·
1 Parent(s): f8bbc6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -9,7 +9,7 @@ st.title('PromptLab')
9
  # Create two columns for the Shinobi and Raikage buttons
10
  col1, col2 = st.columns(2)
11
 
12
- mode = st.radio("Choose a mode:", ["Shinobi", "Raikage"], horizontal=True)
13
 
14
  # Retrieve the API key from Streamlit secrets
15
  GOOGLE_API_KEY = st.secrets["GEMINI_API_KEY"]
@@ -25,7 +25,7 @@ st.write(f"You selected: {mode}")
25
 
26
 
27
  # Shinobi and Raikage templates
28
- SHINOBI_TEMPLATE = """
29
  Analyze the following user prompt and transform it into an enhanced, structured prompt following these steps:
30
 
31
  1. Determine the primary subject area and required expertise level
@@ -49,7 +49,7 @@ The enhanced prompt should provide clear guidance on both content and format, ma
49
 
50
  """
51
 
52
- RAIKAGE_TEMPLATE = """
53
  You are an elite-level [role] with deep expertise in [subject].
54
  Your task is to develop a structured, high-quality response following these key elements:
55
 
@@ -79,9 +79,9 @@ if st.button("Generate Enhanced Prompt"):
79
  with st.spinner("Enhancing your prompt..."):
80
  # Choose the template based on the selected mode
81
  if mode == "Shinobi":
82
- prompt = SHINOBI_TEMPLATE.format(user_prompt=topic)
83
  else:
84
- prompt = RAIKAGE_TEMPLATE.format(user_prompt=topic)
85
 
86
  # Initialize the generative model
87
  model = genai.GenerativeModel('gemini-2.0-flash')
 
9
  # Create two columns for the Shinobi and Raikage buttons
10
  col1, col2 = st.columns(2)
11
 
12
+ mode = st.radio("Choose a mode:", ["Proficient Level", "Apex Level"], horizontal=True)
13
 
14
  # Retrieve the API key from Streamlit secrets
15
  GOOGLE_API_KEY = st.secrets["GEMINI_API_KEY"]
 
25
 
26
 
27
  # Shinobi and Raikage templates
28
+ Proficient_TEMPLATE = """
29
  Analyze the following user prompt and transform it into an enhanced, structured prompt following these steps:
30
 
31
  1. Determine the primary subject area and required expertise level
 
49
 
50
  """
51
 
52
+ Apex_TEMPLATE = """
53
  You are an elite-level [role] with deep expertise in [subject].
54
  Your task is to develop a structured, high-quality response following these key elements:
55
 
 
79
  with st.spinner("Enhancing your prompt..."):
80
  # Choose the template based on the selected mode
81
  if mode == "Shinobi":
82
+ prompt = Proficient_TEMPLATE.format(user_prompt=topic)
83
  else:
84
+ prompt = Apex_TEMPLATE.format(user_prompt=topic)
85
 
86
  # Initialize the generative model
87
  model = genai.GenerativeModel('gemini-2.0-flash')