Spaces:
Build error
Build error
Download app.py from ValadisCERTH/CountriesCitiesModuleSerco: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/spaces/ValadisCERTH/CountriesCitiesModuleSerco/resolve/main/app.py
- Command line
-
hf download hf://spaces/ValadisCERTH/CountriesCitiesModuleSerco/app.py
-
curl -L -o app.py https://huggingface.co/spaces/ValadisCERTH/CountriesCitiesModuleSerco/resolve/main/app.py
1.24 kB
| from transformers import pipeline | |
| import gradio as gr | |
| from helper import identify_locations | |
| title = "Countries/Cities Identification Demo" | |
| description = "This is a simple demo just for demonstration purposes for the Serco team, to validate the first results of the Natural Language module concerning the identification of countries and cities" | |
| examples = [ | |
| ["I want an earthquake that is located in Rome, Italy in 01/01/23 with magnitude greater than 6.2"], | |
| ["I want an earthquake that is located in Buenos Aires, Argentina in 01/01/23 with magnitude greater than 6.2"], | |
| ["I want an earthquake that is located in United Arab Emirates in 01/01/23 with magnitude greater than 6.2"], | |
| ["I want an earthquake that is located in Ishkashim, Tajikistan, in 01/01/23 with magnitude greater than 6.2"], | |
| ["I want an earthquake that is located in Burkina Faso in 01/01/23 with magnitude greater than 6.2."], | |
| ["I want an earthquake that is located in Dibba Al-Fujairah, United Arab Emirates in 01/01/23 with magnitude greater than 6.2"], | |
| ] | |
| gr.Interface( | |
| fn=identify_locations, | |
| inputs="text", | |
| outputs="text", | |
| title=title, | |
| description=description, | |
| examples=examples, | |
| enable_queue=True, | |
| ).launch() |