davidkim205 commited on
Commit
62b730b
·
verified ·
1 Parent(s): 1340340

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -37,18 +37,15 @@ def respond(
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],
@@ -58,6 +55,9 @@ def main():
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")
 
37
 
38
 
39
  def main():
40
+ description_text1 = """<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>
 
41
  <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>
42
  """
43
 
44
+ description_text2 = """<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>
 
45
  <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>
46
  """
47
 
48
+ description_text3 = """<span style="font-size: 23px;">kgrammar currently has the following versions available → kgrammar-2-1b, kgrammar-2-3b.</span></br></br>
 
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],
 
55
 
56
  with gr.Blocks() as app:
57
  gr.Markdown("# 🤖 Checking Korean Grammar Accuracy with kgrammar")
58
+ gr.Markdown("")
59
+ gr.Markdown("## | [Model](https://huggingface.co/collections/davidkim205/keval-2-67ac5400f5eef4984cc5dbbb) | [Paper](https://davidkim205.github.io/keval.html) | [Code](https://github.com/davidkim205/simple-keval) |")
60
+ gr.Markdown("")
61
  gr.Markdown("## What Is kgrammar?")
62
  gr.Markdown(description_text1)
63
  gr.Markdown("## kgrammar Dataset")