Spaces:
Running
Running
Commit
·
b279b31
1
Parent(s):
835c83e
UX and example
Browse files
app.py
CHANGED
@@ -130,8 +130,8 @@ AI_texts = [
|
|
130 |
Human_texts = [
|
131 |
"The present book is intended as a text in basic mathematics. As such, it can have multiple use: for a one-year course in the high schools during the third or fourth year (if possible the third, so that calculus can be taken during the fourth year); for a complementary reference in earlier high school grades (elementary algebra and geometry are covered); for a one-semester course at the college level, to review or to get a firm foundation in the basic mathematics necessary to go ahead in calculus, linear algebra, or other topics. Years ago, the colleges used to give courses in “ college algebra” and other subjects which should have been covered in high school. More recently, such courses have been thought unnecessary, but some experiences I have had show that they are just as necessary as ever. What is happening is that thecolleges are getting a wide variety of students from high schools, ranging from exceedingly well-prepared ones who have had a good first course in calculus, down to very poorly prepared ones.",
|
132 |
"Fats are rich in energy, build body cells, support brain development of infants, help body processes, and facilitate the absorption and use of fat-soluble vitamins A, D, E, and K. The major component of lipids is glycerol and fatty acids. According to chemical properties, fatty acids can be divided into saturated and unsaturated fatty acids. Generally lipids containing saturated fatty acids are solid at room temperature and include animal fats (butter, lard, tallow, ghee) and tropical oils (palm,coconut, palm kernel). Saturated fats increase the risk of heart disease.",
|
133 |
-
"BERT, which stands for Bidirectional Encoder Representations from Transformers, is a deep learning model introduced by Google in 2018 to help machines understand the complex nuances of human language. Thanks to its Transformer-based architecture, it can grasp the deeper meaning and context of words in the text. This makes BERT especially effective at tasks like text classification, translation, question answering, and language inference."
|
134 |
-
|
135 |
iface = gr.Blocks(css="""
|
136 |
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');
|
137 |
|
@@ -229,7 +229,7 @@ with iface:
|
|
229 |
gr.Markdown(f"# {title}")
|
230 |
gr.Markdown(description)
|
231 |
text_input = gr.Textbox(label="", placeholder="Type or paste your content here...", elem_id="text_input_box", lines=5)
|
232 |
-
result_output = gr.Markdown("
|
233 |
text_input.change(classify_text, inputs=text_input, outputs=result_output)
|
234 |
with gr.Tab("AI text examples"):
|
235 |
gr.Examples(AI_texts, inputs=text_input)
|
|
|
130 |
Human_texts = [
|
131 |
"The present book is intended as a text in basic mathematics. As such, it can have multiple use: for a one-year course in the high schools during the third or fourth year (if possible the third, so that calculus can be taken during the fourth year); for a complementary reference in earlier high school grades (elementary algebra and geometry are covered); for a one-semester course at the college level, to review or to get a firm foundation in the basic mathematics necessary to go ahead in calculus, linear algebra, or other topics. Years ago, the colleges used to give courses in “ college algebra” and other subjects which should have been covered in high school. More recently, such courses have been thought unnecessary, but some experiences I have had show that they are just as necessary as ever. What is happening is that thecolleges are getting a wide variety of students from high schools, ranging from exceedingly well-prepared ones who have had a good first course in calculus, down to very poorly prepared ones.",
|
132 |
"Fats are rich in energy, build body cells, support brain development of infants, help body processes, and facilitate the absorption and use of fat-soluble vitamins A, D, E, and K. The major component of lipids is glycerol and fatty acids. According to chemical properties, fatty acids can be divided into saturated and unsaturated fatty acids. Generally lipids containing saturated fatty acids are solid at room temperature and include animal fats (butter, lard, tallow, ghee) and tropical oils (palm,coconut, palm kernel). Saturated fats increase the risk of heart disease.",
|
133 |
+
"BERT, which stands for Bidirectional Encoder Representations from Transformers, is a deep learning model introduced by Google in 2018 to help machines understand the complex nuances of human language. Thanks to its Transformer-based architecture, it can grasp the deeper meaning and context of words in the text. This makes BERT especially effective at tasks like text classification, translation, question answering, and language inference. Natural language often contains words or phrases with multiple possible meanings. BERT analyzes the surrounding context—the words and sentences that come before and after—to determine the meaning. In the past, language models processed text either left-to-right or right-to-left. By reading text in both directions at once, BERT can better understand the full context of each word. The model comes in two main versions: base and large. The architecture is the same for both, but they differ in the number of parameters they use. BERT large has over three times more parameters to fine-tune compared to BERT base.",
|
134 |
+
]
|
135 |
iface = gr.Blocks(css="""
|
136 |
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');
|
137 |
|
|
|
229 |
gr.Markdown(f"# {title}")
|
230 |
gr.Markdown(description)
|
231 |
text_input = gr.Textbox(label="", placeholder="Type or paste your content here...", elem_id="text_input_box", lines=5)
|
232 |
+
result_output = gr.Markdown("", elem_id="result_output_box")
|
233 |
text_input.change(classify_text, inputs=text_input, outputs=result_output)
|
234 |
with gr.Tab("AI text examples"):
|
235 |
gr.Examples(AI_texts, inputs=text_input)
|