Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,5 +16,19 @@ def predict(text):
|
|
| 16 |
else:
|
| 17 |
return "Not climate related"
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
# Creamos la interfaz y la lanzamos.
|
| 20 |
-
gr.Interface(fn=predict, inputs=gr.inputs.Textbox(lines=
|
|
|
|
| 16 |
else:
|
| 17 |
return "Not climate related"
|
| 18 |
|
| 19 |
+
# Textos de ejemplo
|
| 20 |
+
examples = [
|
| 21 |
+
"The increasing levels of CO2 in the atmosphere are a major cause of global warming.",
|
| 22 |
+
"Scientists are working on new methods to reduce greenhouse gas emissions.",
|
| 23 |
+
"Climate change is causing more frequent and severe weather events around the world.",
|
| 24 |
+
"Renewable energy sources like wind and solar power are essential to combating climate change.",
|
| 25 |
+
"Rising sea levels are threatening coastal communities and ecosystems.",
|
| 26 |
+
"I had a great time at the concert last night, the band was amazing!",
|
| 27 |
+
"The new restaurant in town serves the best sushi I've ever had.",
|
| 28 |
+
"She enjoys reading mystery novels and solving puzzles in her free time.",
|
| 29 |
+
"The software update includes several new features and bug fixes.",
|
| 30 |
+
"He decided to take a photography class to improve his skills."
|
| 31 |
+
]
|
| 32 |
+
|
| 33 |
# Creamos la interfaz y la lanzamos.
|
| 34 |
+
gr.Interface(fn=predict, inputs=gr.inputs.Textbox(lines=1, placeholder="Enter text here..."), outputs=gr.Textbox(), examples=examples).launch(share=False)
|