Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,7 +60,7 @@ def call_gemini(summary):
|
|
| 60 |
|
| 61 |
headers = {"Content-Type": "application/json"}
|
| 62 |
# ⚠️ 保留你的完整 prompt,不修改
|
| 63 |
-
prompt = f"""你是臨床教師,根據以下七大題項和等第制,請對實習醫學生的一分鐘總結進行評分與評論。學生主要用什麼語言回答你就用什麼語言給分打回饋。
|
| 64 |
評分規準:
|
| 65 |
• 優異(A):90-100分
|
| 66 |
o 評語: 內容精確、邏輯嚴謹,能對病程變化做出全面且深入的分析。能將各項資訊融會貫通,並在鑑別診斷中展現清晰的臨床思維。
|
|
@@ -121,6 +121,7 @@ ________________________________________
|
|
| 121 |
全人評分分數分配:
|
| 122 |
5: 50分/4: 40 分/3: 10 分
|
| 123 |
共100分
|
|
|
|
| 124 |
________________________________________
|
| 125 |
請輸出格式:
|
| 126 |
1. 各項逐條給分與簡評
|
|
@@ -132,6 +133,7 @@ ________________________________________
|
|
| 132 |
|
| 133 |
學生的一分鐘總結如下:
|
| 134 |
{summary}
|
|
|
|
| 135 |
"""
|
| 136 |
data = {"contents": [{"parts": [{"text": prompt}]}]}
|
| 137 |
resp = requests.post(API_URL, headers=headers, data=json.dumps(data), timeout=30)
|
|
@@ -174,10 +176,10 @@ with gr.Blocks(title="One-Minute Summary 評分") as demo:
|
|
| 174 |
level = gr.Dropdown(
|
| 175 |
choices=["主治醫師Visiting Staff", "住院醫師Resident", "PGY2", "PGY1", "Clerk2", "Clerk1","其他Other"],
|
| 176 |
value="Clerk1",
|
| 177 |
-
label="請選擇職級"
|
| 178 |
)
|
| 179 |
|
| 180 |
-
name = gr.Textbox(label="姓名", lines=1, placeholder="請輸入姓名")
|
| 181 |
|
| 182 |
p1 = gr.Textbox(label="1. 年齡Age、性別Sex、Chief Complaint (10分)", lines=2)
|
| 183 |
p2 = gr.Textbox(label="2. 個人病史Personal History (10分)", lines=2)
|
|
|
|
| 60 |
|
| 61 |
headers = {"Content-Type": "application/json"}
|
| 62 |
# ⚠️ 保留你的完整 prompt,不修改
|
| 63 |
+
prompt = f"""你是臨床教師,學生主要用什麼語言回答你就用什麼語言給分打回饋。根據以下七大題項和等第制,請對實習醫學生的一分鐘總結進行評分與評論。學生主要用什麼語言回答你就用什麼語言給分打回饋。
|
| 64 |
評分規準:
|
| 65 |
• 優異(A):90-100分
|
| 66 |
o 評語: 內容精確、邏輯嚴謹,能對病程變化做出全面且深入的分析。能將各項資訊融會貫通,並在鑑別診斷中展現清晰的臨床思維。
|
|
|
|
| 121 |
全人評分分數分配:
|
| 122 |
5: 50分/4: 40 分/3: 10 分
|
| 123 |
共100分
|
| 124 |
+
學生主要用什麼語言回答你就用什麼語言給分打回饋。
|
| 125 |
________________________________________
|
| 126 |
請輸出格式:
|
| 127 |
1. 各項逐條給分與簡評
|
|
|
|
| 133 |
|
| 134 |
學生的一分鐘總結如下:
|
| 135 |
{summary}
|
| 136 |
+
學生主要用什麼語言回答你就用什麼語言給分打回饋。
|
| 137 |
"""
|
| 138 |
data = {"contents": [{"parts": [{"text": prompt}]}]}
|
| 139 |
resp = requests.post(API_URL, headers=headers, data=json.dumps(data), timeout=30)
|
|
|
|
| 176 |
level = gr.Dropdown(
|
| 177 |
choices=["主治醫師Visiting Staff", "住院醫師Resident", "PGY2", "PGY1", "Clerk2", "Clerk1","其他Other"],
|
| 178 |
value="Clerk1",
|
| 179 |
+
label="請選擇職級Choose your role"
|
| 180 |
)
|
| 181 |
|
| 182 |
+
name = gr.Textbox(label="姓名Name", lines=1, placeholder="請輸入姓名Your Name")
|
| 183 |
|
| 184 |
p1 = gr.Textbox(label="1. 年齡Age、性別Sex、Chief Complaint (10分)", lines=2)
|
| 185 |
p2 = gr.Textbox(label="2. 個人病史Personal History (10分)", lines=2)
|