mohsenfayyaz
commited on
Commit
•
3dc0cd0
1
Parent(s):
42286b1
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
generator = pipeline('
|
5 |
|
6 |
def generate(text):
|
7 |
-
result = generator(text, max_length=
|
8 |
return result[0]["generated_text"]
|
9 |
|
10 |
examples = [
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
generator = pipeline('text2text-generation', model='mohsenfayyaz/mt5-small-query_realestate_cars-finetuned')
|
5 |
|
6 |
def generate(text):
|
7 |
+
result = generator(text, max_length=200)
|
8 |
return result[0]["generated_text"]
|
9 |
|
10 |
examples = [
|