IAUCourseExp commited on
Commit
23c5cbe
·
verified ·
1 Parent(s): 7906f18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -20
app.py CHANGED
@@ -1,20 +1,20 @@
1
- import gradio as gr
2
- import google.generativeai as genai
3
- from my_logic import answer_question
4
- import os
5
-
6
- genai.configure(api_key=os.getenv("GEMINI_API_KEY"))
7
- gemini_model = genai.GenerativeModel("models/gemini-2.0-pro-exp-02-05")
8
-
9
- def chatbot_interface(user_question):
10
- return answer_question(user_question, gemini_model)
11
-
12
- demo = gr.Interface(
13
- fn=chatbot_interface,
14
- inputs=gr.Textbox(lines=2, placeholder="مثلاً: برای مدار منطقی استاد شایگان چطوره؟", label="❓ سوال شما"),
15
- outputs=gr.Textbox(label="📘 پاسخ"),
16
- title= "🤖 ربات مشاور تجربیات انتخاب واحد",
17
- description="پاسخ بر اساس تجربیات واقعی دانشجویان از کانال @IAUCourseExp"
18
- )
19
-
20
- demo.launch()
 
1
+ import gradio as gr
2
+ import google.generativeai as genai
3
+ from my_logic import answer_question
4
+ import os
5
+
6
+ genai.configure(api_key=os.getenv("GEMINI_API_KEY"))
7
+ gemini_model = genai.GenerativeModel("models/gemma-3-27b-it")
8
+
9
+ def chatbot_interface(user_question):
10
+ return answer_question(user_question, gemini_model)
11
+
12
+ demo = gr.Interface(
13
+ fn=chatbot_interface,
14
+ inputs=gr.Textbox(lines=2, placeholder="مثلاً: برای مدار منطقی استاد شایگان چطوره؟", label="❓ سوال شما"),
15
+ outputs=gr.Textbox(label="📘 پاسخ"),
16
+ title= "🤖 ربات مشاور تجربیات انتخاب واحد",
17
+ description="پاسخ بر اساس تجربیات واقعی دانشجویان از کانال @IAUCourseExp"
18
+ )
19
+
20
+ demo.launch()