File size: 1,105 Bytes
757d04b
 
478dcd7
 
 
757d04b
 
15643da
757d04b
 
 
ac76be2
757d04b
 
478dcd7
 
757d04b
478dcd7
b72816e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ac76be2
478dcd7
faec829
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
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