Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,15 +37,18 @@ def respond(
|
|
| 37 |
|
| 38 |
|
| 39 |
def main():
|
| 40 |
-
|
| 41 |
-
</br><span style="font-size:
|
| 42 |
-
<span style="font-size:
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
<span style="font-size:
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
| 49 |
"""
|
| 50 |
|
| 51 |
examples_list = [["우선, 성인 티켓의 가격은 $4입니다. 총 판매된 티켓 수는 59장이며, 학생 티켓은 9장입니다. 我们需要计算学生票价。성인 티켓은 50장이 판매되었으므로, 성인 티켓으로 얻은 수익은 50 * 4 = $200입니다. Total revenue是 $222.50, 所以学生票的收入为 $222.50 - $200 = $22.50。俄语로 说, 每张学生票的价格 = $22.50 ÷ 9 = $2.50。학생 티켓의 가격은 2.5ดอลล่าครับ.", "한국어 문맥상 부자연스러운 부분을 찾으시오. 오류 문장과 개수는 <incorrect grammar> </incorrect grammar> tag, 즉 <incorrect grammar> - 오류 문장과 설명 </incorrect grammar> 안에 담겨 있으며, <wrong count> </wrong count> tag, 즉 <wrong count> 오류 개수 </wrong count> 이다.", None, None, None, None],
|
|
@@ -54,8 +57,13 @@ def main():
|
|
| 54 |
]
|
| 55 |
|
| 56 |
with gr.Blocks() as app:
|
| 57 |
-
gr.Markdown("# Checking Korean Grammar Accuracy with
|
| 58 |
-
gr.Markdown(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
gr.HTML("""<style>
|
| 61 |
#submit-btn {
|
|
@@ -72,7 +80,7 @@ def main():
|
|
| 72 |
</style>
|
| 73 |
""")
|
| 74 |
|
| 75 |
-
gr.Markdown("## Try it out!")
|
| 76 |
with gr.Row():
|
| 77 |
with gr.Column(scale=1):
|
| 78 |
text1 = gr.Textbox(label="User Message")
|
|
|
|
| 37 |
|
| 38 |
|
| 39 |
def main():
|
| 40 |
+
description_text1 = """
|
| 41 |
+
</br><span style="font-size: 23px;">The kgrammar model is a state-of-the-art language assessment model designed to evaluate Korean sentences, specifically focusing on detecting instances where a response deviates by incorporating foreign languages or mixing multiple languages within a sentence.</span></br>
|
| 42 |
+
<span style="font-size: 23px;">Built on the Gemma-2-9B architecture, kgrammar aims to ensure language consistency and clarity in Korean text, making it a valuable tool for assessing and refining language models that generate Korean responses.</span> </br></br>
|
| 43 |
+
"""
|
| 44 |
+
|
| 45 |
+
description_text2 = """
|
| 46 |
+
</br><span style="font-size: 23px;">The kgrammar-testset was created to train and validate the kgrammar model. This dataset was generated using GPT-4o, incorporating predefined prompts designed to introduce grammatical errors into responses when a question was given.</span></br>
|
| 47 |
+
<span style="font-size: 23px;">To ensure a balanced distribution, the dataset consists of 50% general questions, 25% math-related questions, 25% coding-related questions. This structure helps prevent mathematical expressions and code from being mistakenly identified as language errors.</span> </br></br>
|
| 48 |
+
"""
|
| 49 |
+
|
| 50 |
+
description_text3 = """
|
| 51 |
+
</br><span style="font-size: 23px;">kgrammar currently has the following versions available: kgrammar-2-1b, kgrammar-2-3b.</span></br></br>
|
| 52 |
"""
|
| 53 |
|
| 54 |
examples_list = [["우선, 성인 티켓의 가격은 $4입니다. 총 판매된 티켓 수는 59장이며, 학생 티켓은 9장입니다. 我们需要计算学生票价。성인 티켓은 50장이 판매되었으므로, 성인 티켓으로 얻은 수익은 50 * 4 = $200입니다. Total revenue是 $222.50, 所以学生票的收入为 $222.50 - $200 = $22.50。俄语로 说, 每张学生票的价格 = $22.50 ÷ 9 = $2.50。학생 티켓의 가격은 2.5ดอลล่าครับ.", "한국어 문맥상 부자연스러운 부분을 찾으시오. 오류 문장과 개수는 <incorrect grammar> </incorrect grammar> tag, 즉 <incorrect grammar> - 오류 문장과 설명 </incorrect grammar> 안에 담겨 있으며, <wrong count> </wrong count> tag, 즉 <wrong count> 오류 개수 </wrong count> 이다.", None, None, None, None],
|
|
|
|
| 57 |
]
|
| 58 |
|
| 59 |
with gr.Blocks() as app:
|
| 60 |
+
gr.Markdown("# 🤖 Checking Korean Grammar Accuracy with kgrammar")
|
| 61 |
+
gr.Markdown("## What Is kgrammar?")
|
| 62 |
+
gr.Markdown(description_text1)
|
| 63 |
+
gr.Markdown("## kgrammar Dataset")
|
| 64 |
+
gr.Markdown(description_text2)
|
| 65 |
+
gr.Markdown("## Available kgrammar Models")
|
| 66 |
+
gr.Markdown(description_text3)
|
| 67 |
|
| 68 |
gr.HTML("""<style>
|
| 69 |
#submit-btn {
|
|
|
|
| 80 |
</style>
|
| 81 |
""")
|
| 82 |
|
| 83 |
+
gr.Markdown("## 🖱️ Try it out!")
|
| 84 |
with gr.Row():
|
| 85 |
with gr.Column(scale=1):
|
| 86 |
text1 = gr.Textbox(label="User Message")
|