arifagustyawan
commited on
Commit
•
695677a
1
Parent(s):
3f8c6db
change pipeline task
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
custom_pipe = pipeline("
|
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))
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
custom_pipe = pipeline("text2text-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))
|