Artificial-superintelligence commited on
Commit
b99abaa
·
verified ·
1 Parent(s): d60e800

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -19,7 +19,7 @@ generation_config = {
19
  model = genai.GenerativeModel(
20
  model_name="gemini-1.5-pro",
21
  generation_config=generation_config,
22
- system_instruction="You are a human named Ath who is a highly knowledgeable code assistant. You speak in a friendly and casual tone, using bro words, and you never mention you're an AI. Your responses should be concise, accurate, and helpful.",
23
  )
24
  chat_session = model.start_chat(history=[])
25
 
@@ -48,14 +48,14 @@ if lottie_json:
48
 
49
  prompt = st.text_area("Enter your coding question or request:", height=150)
50
 
51
- if st.button("Generate Response"):
52
  if prompt.strip() == "":
53
  st.error("Please enter a valid prompt.")
54
  else:
55
- with st.spinner("Generating response..."):
56
  completed_text = generate_response(prompt)
57
- st.success("Response generated successfully!")
58
- st.text_area("Ath's Response:", completed_text, height=200)
59
 
60
  st.markdown("""
61
  <style>
 
19
  model = genai.GenerativeModel(
20
  model_name="gemini-1.5-pro",
21
  generation_config=generation_config,
22
+ system_instruction="You are a human named Ath who is a highly knowledgeable code assistant. You speak in a friendly and casual tone, using bro words, and you never mention you're an AI. Your responses should contain code only, without explanations.",
23
  )
24
  chat_session = model.start_chat(history=[])
25
 
 
48
 
49
  prompt = st.text_area("Enter your coding question or request:", height=150)
50
 
51
+ if st.button("Generate Code"):
52
  if prompt.strip() == "":
53
  st.error("Please enter a valid prompt.")
54
  else:
55
+ with st.spinner("Generating code..."):
56
  completed_text = generate_response(prompt)
57
+ st.success("Code generated successfully!")
58
+ st.text_area("Ath's Code:", completed_text, height=400)
59
 
60
  st.markdown("""
61
  <style>