Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -152,7 +152,15 @@ with gr.Blocks(title="Science Text Analyzer") as demo:
|
|
| 152 |
)
|
| 153 |
with gr.Row():
|
| 154 |
with gr.Column():
|
| 155 |
-
text_input = gr.Textbox(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
classify_button = gr.Button("Classify")
|
| 157 |
with gr.Column():
|
| 158 |
output = gr.Textbox(label="Classification Result", placeholder="The predicted subject and confidence will appear here.")
|
|
@@ -176,12 +184,11 @@ with gr.Blocks(title="Science Text Analyzer") as demo:
|
|
| 176 |
|
| 177 |
gr.Markdown("### About This App")
|
| 178 |
gr.Markdown(
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
)
|
| 184 |
-
|
| 185 |
|
| 186 |
# Launch the app
|
| 187 |
demo.launch()
|
|
|
|
| 152 |
)
|
| 153 |
with gr.Row():
|
| 154 |
with gr.Column():
|
| 155 |
+
text_input = gr.Textbox(
|
| 156 |
+
label="Enter Text",
|
| 157 |
+
lines=5,
|
| 158 |
+
placeholder="Paste a sentence or paragraph here...",
|
| 159 |
+
examples=[
|
| 160 |
+
"The process of photosynthesis converts carbon dioxide and water into glucose and oxygen using sunlight.",
|
| 161 |
+
"The Pythagorean theorem states that in a right-angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides."
|
| 162 |
+
]
|
| 163 |
+
)
|
| 164 |
classify_button = gr.Button("Classify")
|
| 165 |
with gr.Column():
|
| 166 |
output = gr.Textbox(label="Classification Result", placeholder="The predicted subject and confidence will appear here.")
|
|
|
|
| 184 |
|
| 185 |
gr.Markdown("### About This App")
|
| 186 |
gr.Markdown(
|
| 187 |
+
"The **Science Text Analyzer** uses deep learning models trained on curated academic datasets to classify and generate content "
|
| 188 |
+
"related to academic disciplines. The **classifier** categorizes input text into one of three subjects: **Science**, **Mathematics**, or **History**. "
|
| 189 |
+
"The **text generator** produces coherent scientific passages, especially focused on **Physics**, **Chemistry**, and **Biology**, making it a valuable tool "
|
| 190 |
+
"for **educational research**, **content creation**, and **curriculum support**."
|
| 191 |
+
)
|
|
|
|
| 192 |
|
| 193 |
# Launch the app
|
| 194 |
demo.launch()
|