arifagustyawan
commited on
Commit
•
3f8c6db
1
Parent(s):
6bb4810
add process button
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from transformers import pipeline
|
|
4 |
custom_pipe = pipeline("text-generation", model="arifagustyawan/flan-t5-base-sentiment-product-review")
|
5 |
|
6 |
def genrate_sentiment(text, max_new_tokens, num_beams):
|
7 |
-
return custom_pipe(text, max_new_tokens=max_new_tokens, num_beams=num_beams)
|
8 |
|
9 |
with gr.Blocks() as demo:
|
10 |
gr.Markdown(
|
|
|
4 |
custom_pipe = pipeline("text-generation", model="arifagustyawan/flan-t5-base-sentiment-product-review")
|
5 |
|
6 |
def genrate_sentiment(text, max_new_tokens, num_beams):
|
7 |
+
return custom_pipe(text, max_new_tokens=max_new_tokens, num_beams=int(num_beams))
|
8 |
|
9 |
with gr.Blocks() as demo:
|
10 |
gr.Markdown(
|