Spaces:
Paused
Paused
CountingMstar
commited on
Commit
โข
1da755f
1
Parent(s):
efdb5f5
Update app.py
Browse files
app.py
CHANGED
@@ -27,34 +27,20 @@ def submit(context, question):
|
|
27 |
return answer
|
28 |
|
29 |
examples = [
|
30 |
-
["A large language model
|
31 |
-
["Feature engineering
|
32 |
-
["
|
33 |
]
|
34 |
|
35 |
-
gr.Markdown("""
|
36 |
-
# AI Tutor BERT
|
37 |
-
์ด ๋ชจ๋ธ์ ์ธ๊ณต์ง๋ฅ(AI) ๊ด๋ จ ์ฉ์ด ๋ฐ ์ค๋ช
์ ํ์ธํ๋(fine-tuning)ํ BERT ๋ชจ๋ธ์
๋๋ค.
|
38 |
-
## Model
|
39 |
-
https://huggingface.co/bert-base-uncased
|
40 |
-
๋ชจ๋ธ์ ๊ฒฝ์ฐ ์์ฐ์ด ์ฒ๋ฆฌ ๋ชจ๋ธ ์ค ๊ฐ์ฅ ์ ๋ช
ํ Google์์ ๊ฐ๋ฐํ BERT๋ฅผ ์ฌ์ฉํ์ต๋๋ค. ์์ธํ ์ค๋ช
์ ์ ์ฌ์ดํธ๋ฅผ ์ฐธ๊ณ ํ์๊ธฐ ๋ฐ๋๋๋ค. ์ง์์๋ต์ด ์ฃผ์ธ ๊ณผ์ธ ์ ์๋๋ต๊ฒ, BERT ์ค์์๋ ์ง์์๋ต์ ํนํ๋ Question and Answering ๋ชจ๋ธ์ ์ฌ์ฉํ์์ต๋๋ค.
|
41 |
-
|
42 |
-
## Dataset
|
43 |
-
[Wikipedia] https://en.wikipedia.org/wiki/Main_Page
|
44 |
-
[activeloop] https://www.activeloop.ai/resources/glossary/arima-models/
|
45 |
-
[Adrien Beaulieu] https://product.house/100-ai-glossary-terms-explained-to-the-rest-of-us/
|
46 |
-
ํ์ต ๋ฐ์ดํฐ์
์ ์ธ๊ณต์ง๋ฅ ๊ด๋ จ ๋ฌธ๋งฅ, ์ง๋ฌธ, ๊ทธ๋ฆฌ๊ณ ์๋ต ์ด๋ ๊ฒ 3๊ฐ์ง๋ก ๊ตฌ์ฑ์ด ๋์ด์์ต๋๋ค. ์๋ต(์ ๋ต) ๋ฐ์ดํฐ๋ ๋ฌธ๋งฅ ๋ฐ์ดํฐ ์์ ํฌํจ๋์ด ์๊ณ , ๋ฌธ๋งฅ ๋ฐ์ดํฐ์ ๋ฌธ์ฅ ์์๋ฅผ ๋ฐ๊ฟ์ฃผ์ด ๋ฐ์ดํฐ๋ฅผ ์ฆ๊ฐํ์์ต๋๋ค. ์ง๋ฌธ ๋ฐ์ดํฐ๋ ์ฃผ์ ๊ฐ ๋๋ ์ธ๊ณต์ง๋ฅ ์ฉ์ด๋ก ์ค์ ํ์ต๋๋ค. ์์ ์์๋ฅผ ๋ณด์๋ฉด ์ดํดํ์๊ธฐ ํธํ์ค ๊ฒ๋๋ค. ์ด ๋ฐ์ดํฐ ์๋ 3300์ฌ ๊ฐ๋ก data ํด๋์ pickle ํ์ผ ํํ๋ก ์ ์ฅ๋์ด ์๊ณ , ๋ฐ์ดํฐ๋ Wikipedia ๋ฐ ๋ค๋ฅธ ์ฌ์ดํธ๋ค์ ์์ html์ ์ด์ฉํ์ฌ ์ถ์ถ ๋ฐ ๊ฐ๊ณตํ์ฌ ์ ์ํ์์ต๋๋ค. ํด๋น ์ถ์ฒ๋ ์์ ๊ฐ์ต๋๋ค.
|
47 |
-
|
48 |
-
## How to use
|
49 |
-
์
๋ ฅ ์์ ๋ 'Examples'์ ํ๊ธฐํด ๋์์ต๋๋ค.
|
50 |
-
๊ด๋ จ ๋ฌธ์ฅ๊ณผ ์ ์๋ฅผ ์๊ณ ์ถ์ ๋จ์ด๋ฅผ ๊ฐ๊ฐ `Contexts`, `Question`์ ์
๋ ฅํ ํ `Submit` ๋ฒํผ์ ๋๋ฅด๋ฉด ํด๋น ๋จ์ด์ ๋ํ ์ค๋ช
์ด ๋์ต๋๋ค.
|
51 |
-
""")
|
52 |
-
|
53 |
input_textbox = gr.Textbox("Context", placeholder="Enter context here")
|
54 |
question_textbox = gr.Textbox("Question", placeholder="Enter question here")
|
55 |
|
56 |
input_section = gr.Row([input_textbox, question_textbox])
|
57 |
|
|
|
|
|
|
|
|
|
58 |
|
59 |
iface = gr.Interface(
|
60 |
fn=submit,
|
|
|
27 |
return answer
|
28 |
|
29 |
examples = [
|
30 |
+
["A large language model is...", "What is a large language model?"],
|
31 |
+
["Feature engineering is the process of...", "What is Feature engineering?"],
|
32 |
+
["Attention mechanism calculates soft weights...", "What is Attention mechanism?"]
|
33 |
]
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
input_textbox = gr.Textbox("Context", placeholder="Enter context here")
|
36 |
question_textbox = gr.Textbox("Question", placeholder="Enter question here")
|
37 |
|
38 |
input_section = gr.Row([input_textbox, question_textbox])
|
39 |
|
40 |
+
markdown_text = """
|
41 |
+
## Example Questions
|
42 |
+
Use the examples below or enter your own context and question.
|
43 |
+
"""
|
44 |
|
45 |
iface = gr.Interface(
|
46 |
fn=submit,
|