Spaces:
Runtime error
Runtime error
title: Swedish Entity Recognition | |
emoji: 📝 | |
colorFrom: darkturquoise | |
colorTo: white | |
sdk: gradio | |
sdk_version: 3.12.0 | |
python_version: 3.9.13 | |
app_file: app.py | |
pinned: false | |
license: openrail | |
models: ["KBLab/bert-base-swedish-cased-ner"] | |
# Swedish Entity Recognition | |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference | |
## Preparing a Gradio app for Huggingface Spaces | |
Setup: | |
# Create a “safe” virtual Python environment | |
python3 -m venv env | |
# Install Gradio | |
pip3 install gradio | |
# Install optional packages for your specific app: pip3 install torch transformers | |
# Update the list of required packages | |
pip3 freeze > requirements.txt | |
# Create a blank app.py | |
touch app.py | |
Edit `app.py`, then run: | |
python3 app.py | |
and test your Gradio app on: http://127.0.0.1:7860/ | |
## REST API via Gradio “Use via API” (see page footer) | |
curl -X POST -H 'Content-type: application/json' --data '{ "data": ["Jag heter Tom och bor i Stockholm."] }' https://tomsoderlund-swedish-entity-recognition.hf.space/run/predict | |