Spaces:
Sleeping
Sleeping
Download app.py from ValadisCERTH/DatesModuleSerco: direct link, hf CLI and curl.
- Browser
- Download file 1.31 kB
-
https://huggingface.co/spaces/ValadisCERTH/DatesModuleSerco/resolve/main/app.py
- Command line
-
hf download hf://spaces/ValadisCERTH/DatesModuleSerco/app.py
-
curl -L -o app.py https://huggingface.co/spaces/ValadisCERTH/DatesModuleSerco/resolve/main/app.py
1.31 kB
| from transformers import pipeline | |
| import gradio as gr | |
| from helper import dates_binding | |
| title = "Date 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 dates" | |
| examples = [ | |
| ["Earthquake located in Rome, Italy in 01/01/23 with magnitude greater than 6.2"], | |
| ["Earthquake located in Rome, Italy in 1-1-2023 with magnitude greater than 6.2"], | |
| ["Earthquake located in Rome, Italy in 1/1/23 with magnitude greater than 6.2"], | |
| ["Earthquake located in Rome, Italy in January 1, 2023 with magnitude greater than 6.2"], | |
| ["Earthquake located in Rome, Italy in Jan 1, 23 with magnitude greater than 6.2"], | |
| ["Earthquake located in Rome, Italy in 1 January 2023 with magnitude greater than 6.2"], | |
| ["Earthquake located in Rome, Italy in 1 Jan 23 with magnitude greater than 6.2"], | |
| ["Earthquake located in Rome, Italy in January 2023 with magnitude greater than 6.2"], | |
| ["Earthquake located in Rome, Italy in Jan 2023 with magnitude greater than 6.2"], | |
| ] | |
| gr.Interface( | |
| fn=dates_binding, | |
| inputs="text", | |
| outputs="text", | |
| title=title, | |
| description=description, | |
| examples=examples, | |
| enable_queue=True, | |
| ).launch() |