Spaces:
Runtime error
Runtime error
Commit
·
5a8655c
1
Parent(s):
f128f38
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,9 @@ def generate_review(prompt):
|
|
21 |
|
22 |
title="Turkish Review Generator: A GPT2 based Text Generator Trained with a Custom Dataset"
|
23 |
description= """Generate a review in Turkish by providing a prompt.
|
24 |
-
Generation takes 15-20 seconds on average.
|
|
|
|
|
25 |
article = """<p style='text-align: center'>On YouTube:</p>
|
26 |
<p style='text-align: center'><a href='https://youtube.com/playlist?list=PLQflnv_s49v9d9w-L0S8XUXXdNks7vPBL' target='_blank'>How to Train a Hugging Face Causal Language Model from Scratch with a Custom Dataset and a Custom Tokenizer?</a></p>
|
27 |
<p style='text-align: center'><a href='https://youtube.com/playlist?list=PLQflnv_s49v8aajw6m9MRNbAAbL63flKD' target='_blank'>Hugging Face kütüphanesini kullanarak bir GPT2 Transformer Dil Modelini Kendi Veri Setimizle nasıl eğitip kullanabiliriz? (in Turkish)</a></p>
|
@@ -30,7 +32,7 @@ article = """<p style='text-align: center'>On YouTube:</p>
|
|
30 |
examples=["Bir hafta önce aldığım cep telefonu",
|
31 |
"Tatil için rezervasyon yaptırdım",
|
32 |
"Geçen ay sipariş verdiğim",
|
33 |
-
"Spor salonuna abone oldum
|
34 |
|
35 |
demo = gr.Interface(fn=generate_review,
|
36 |
inputs= gr.Textbox(lines=5, placeholder="enter or select a prompt below..."),
|
@@ -38,6 +40,8 @@ demo = gr.Interface(fn=generate_review,
|
|
38 |
examples=examples,
|
39 |
title=title,
|
40 |
description= description,
|
41 |
-
article = article
|
|
|
|
|
42 |
)
|
43 |
demo.launch('share=True')
|
|
|
21 |
|
22 |
title="Turkish Review Generator: A GPT2 based Text Generator Trained with a Custom Dataset"
|
23 |
description= """Generate a review in Turkish by providing a prompt.
|
24 |
+
Generation takes 15-20 seconds on average.
|
25 |
+
You can share your experience by Flagging.
|
26 |
+
Enjoy!"""
|
27 |
article = """<p style='text-align: center'>On YouTube:</p>
|
28 |
<p style='text-align: center'><a href='https://youtube.com/playlist?list=PLQflnv_s49v9d9w-L0S8XUXXdNks7vPBL' target='_blank'>How to Train a Hugging Face Causal Language Model from Scratch with a Custom Dataset and a Custom Tokenizer?</a></p>
|
29 |
<p style='text-align: center'><a href='https://youtube.com/playlist?list=PLQflnv_s49v8aajw6m9MRNbAAbL63flKD' target='_blank'>Hugging Face kütüphanesini kullanarak bir GPT2 Transformer Dil Modelini Kendi Veri Setimizle nasıl eğitip kullanabiliriz? (in Turkish)</a></p>
|
|
|
32 |
examples=["Bir hafta önce aldığım cep telefonu",
|
33 |
"Tatil için rezervasyon yaptırdım",
|
34 |
"Geçen ay sipariş verdiğim",
|
35 |
+
"Spor salonuna abone oldum"]
|
36 |
|
37 |
demo = gr.Interface(fn=generate_review,
|
38 |
inputs= gr.Textbox(lines=5, placeholder="enter or select a prompt below..."),
|
|
|
40 |
examples=examples,
|
41 |
title=title,
|
42 |
description= description,
|
43 |
+
article = article,
|
44 |
+
allow_flagging="manual",
|
45 |
+
flagging_options=["reasonable", "non-sense", "moderate"]
|
46 |
)
|
47 |
demo.launch('share=True')
|