Katieearl1513 commited on
Commit
e65b8fe
·
verified ·
1 Parent(s): 2a5ad9c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -14,8 +14,14 @@ generation_config = {
14
  "max_output_tokens": 8192,
15
  "response_mime_type": "text/plain",
16
  }
17
- model_name = "gemini-1.5-flash" # Make model name configurable
18
- system_instruction = "You are an expert tutor assisting students with their homework"
 
 
 
 
 
 
19
 
20
  model = genai.GenerativeModel(
21
  model_name=model_name,
@@ -51,7 +57,7 @@ with gr.Blocks() as demo:
51
  state = gr.State([]) # For chat history
52
 
53
  with gr.Row():
54
- txt = gr.Textbox(show_label=False, placeholder="Type your question here...")
55
  txt.submit(chatbot, [txt, state], [chatbot_interface, state])
56
 
57
  demo.launch()
 
14
  "max_output_tokens": 8192,
15
  "response_mime_type": "text/plain",
16
  }
17
+ model_name = "gemini-flash2-exp" # Use the updated model
18
+
19
+ # Update the system instruction to meet the requirements
20
+ system_instruction = (
21
+ "Eres un tutor experto que responde exclusivamente en castellano o catalán. "
22
+ "Tus respuestas deben centrarse únicamente en temas de estadística básica y "
23
+ "todo el código proporcionado debe implementarse exclusivamente en R."
24
+ )
25
 
26
  model = genai.GenerativeModel(
27
  model_name=model_name,
 
57
  state = gr.State([]) # For chat history
58
 
59
  with gr.Row():
60
+ txt = gr.Textbox(show_label=False, placeholder="Escribe tu pregunta aquí...")
61
  txt.submit(chatbot, [txt, state], [chatbot_interface, state])
62
 
63
  demo.launch()