Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
# from transformers import pipeline
|
2 |
import gradio as gr
|
|
|
3 |
|
4 |
|
5 |
# model = pipeline(
|
@@ -8,7 +9,7 @@ import gradio as gr
|
|
8 |
|
9 |
def predict(prompt):
|
10 |
# summary = model(prompt)[0]["summary_text"]
|
11 |
-
summary =
|
12 |
return summary
|
13 |
|
14 |
|
|
|
1 |
# from transformers import pipeline
|
2 |
import gradio as gr
|
3 |
+
from pythainlp.tokenize import subword_tokenize
|
4 |
|
5 |
|
6 |
# model = pipeline(
|
|
|
9 |
|
10 |
def predict(prompt):
|
11 |
# summary = model(prompt)[0]["summary_text"]
|
12 |
+
summary = subword_tokenize(text_1, engine='tcc')
|
13 |
return summary
|
14 |
|
15 |
|