oroszgy commited on
Commit
0512d9a
1 Parent(s): d2f8db2

Updated demo

Browse files
Files changed (2) hide show
  1. README.md +7 -31
  2. app.py +16 -3
README.md CHANGED
@@ -1,37 +1,13 @@
1
  ---
2
- title: Demo
3
- emoji: 🌍
4
- colorFrom: pink
5
- colorTo: red
6
  sdk: streamlit
7
  app_file: app.py
8
- pinned: false
9
  ---
10
 
11
- # Configuration
12
 
13
- `title`: _string_
14
- Display title for the Space
15
-
16
- `emoji`: _string_
17
- Space emoji (emoji-only character allowed)
18
-
19
- `colorFrom`: _string_
20
- Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
21
-
22
- `colorTo`: _string_
23
- Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
24
-
25
- `sdk`: _string_
26
- Can be either `gradio` or `streamlit`
27
-
28
- `sdk_version` : _string_
29
- Only applicable for `streamlit` SDK.
30
- See [doc](https://hf.co/docs/hub/spaces) for more info on supported versions.
31
-
32
- `app_file`: _string_
33
- Path to your main application file (which contains either `gradio` or `streamlit` Python code).
34
- Path is relative to the root of the repository.
35
-
36
- `pinned`: _boolean_
37
- Whether the Space stays on top of your list.
 
1
  ---
2
+ title: HuSpaCy Demo
3
+ emoji: 🚀
4
+ colorFrom: indigo
5
+ colorTo: gray
6
  sdk: streamlit
7
  app_file: app.py
8
+ pinned: true
9
  ---
10
 
11
+ # 🚀 HuSpacy Demo
12
 
13
+ This repository contains an app demonstrating the capabilities of [HuSpaCy](https://github.com/spacy-hu/spacy-hungarian-models). The demo is available at [Hugging Face Spaces](https://huggingface.co/spaces/huspacy/demo)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app.py CHANGED
@@ -1,5 +1,18 @@
1
  import spacy_streamlit
2
 
3
- models = ["hu_core_news_lg"]
4
- default_text = "Ezután Király Márton, a beruházó cég projektvezetője mesélte el, hogy a területet 2006-ban vásárolta meg az önkormányzattól az első tulajdonos."
5
- spacy_streamlit.visualize(models, default_text)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import spacy_streamlit
2
 
3
+
4
+ models = {"hu_core_news_lg": "hu_core_news_lg"}
5
+
6
+ default_text = """Újraoltatta magát Szputnyik Light vakcinával a Covid-19 ellen Vlagyimir Putyin orosz elnök.
7
+ Itt az újabb kamatdöntés napja. Az MNB adhat irányt a forintnak."""
8
+
9
+ spacy_streamlit.visualize(
10
+ models,
11
+ default_text,
12
+ ["parser", "ner", "tokens", "similarity"],
13
+ show_json_doc = False,
14
+ sidebar_title = "🚀 HuSpaCy",
15
+ sidebar_description = "Industrial strength Hungarian NLP",
16
+ similarity_texts = ("kifli", "zsemle"),
17
+ show_logo = False
18
+ )