Spaces:
Sleeping
Sleeping
Montazerh82
commited on
Commit
·
049ebbc
1
Parent(s):
dc886e0
edit app
Browse files
app.py
CHANGED
@@ -8,6 +8,12 @@ pipe = pipeline("fill-mask", model="HooshvareLab/albert-fa-zwnj-base-v2")
|
|
8 |
def greet(text):
|
9 |
text = cleaning(text)
|
10 |
results = pipe(text)
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
return results
|
12 |
|
13 |
|
|
|
8 |
def greet(text):
|
9 |
text = cleaning(text)
|
10 |
results = pipe(text)
|
11 |
+
result_str = ''
|
12 |
+
|
13 |
+
for result in results:
|
14 |
+
result_str += result['token_str'] + \
|
15 |
+
' (' + result['score'] + ')' + '\n' + result['sequence'] + '\n\n'
|
16 |
+
|
17 |
return results
|
18 |
|
19 |
|