Spaces:
Runtime error
Runtime error
kmkarakaya
commited on
Commit
•
f07215d
1
Parent(s):
1986392
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,10 @@ def generate_review(prompt):
|
|
24 |
title="Turkish Review Generator: A GPT2 based Text Generator Trained with a Custom Dataset"
|
25 |
description= """Generate a review in Turkish by providing a prompt or selecting an example prompt below.
|
26 |
Generation takes <b>15-20 seconds</b> on average.
|
27 |
-
Enjoy!
|
|
|
|
|
|
|
28 |
|
29 |
#<p>NOTE: Examples can sometimes generate ERROR. When you see ERROR on the screen <b>just click SUBMIT</b>. Model will generate text in 15-20 secs.</p>
|
30 |
article = """<p style='text-align: center'>On YouTube:</p>
|
@@ -32,10 +35,12 @@ article = """<p style='text-align: center'>On YouTube:</p>
|
|
32 |
<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>
|
33 |
<p style='text-align: center'>On Medium:</p>
|
34 |
<p style='text-align: center'><a href='https://medium.com/deep-learning-with-keras/how-to-train-a-hugging-face-causal-language-model-from-scratch-8d08d038168f' target='_blank'>How to Train a Hugging Face Causal Language Model from Scratch with a Custom Dataset and a Custom Tokenizer?</a></p>"""
|
35 |
-
examples=["Bir hafta önce aldığım cep telefonu",
|
36 |
-
"Tatil için
|
37 |
-
"Geçen ay sipariş verdiğim",
|
38 |
-
"
|
|
|
|
|
39 |
|
40 |
|
41 |
demo = gr.Interface(fn=generate_review,
|
@@ -52,5 +57,5 @@ demo = gr.Interface(fn=generate_review,
|
|
52 |
)
|
53 |
|
54 |
|
55 |
-
|
56 |
demo.launch()
|
|
|
24 |
title="Turkish Review Generator: A GPT2 based Text Generator Trained with a Custom Dataset"
|
25 |
description= """Generate a review in Turkish by providing a prompt or selecting an example prompt below.
|
26 |
Generation takes <b>15-20 seconds</b> on average.
|
27 |
+
Enjoy!
|
28 |
+
|
29 |
+
![visitor badge](https://visitor-badge.glitch.me/badge?page_id=Auto_Review_Generation_in_Turkish)
|
30 |
+
"""
|
31 |
|
32 |
#<p>NOTE: Examples can sometimes generate ERROR. When you see ERROR on the screen <b>just click SUBMIT</b>. Model will generate text in 15-20 secs.</p>
|
33 |
article = """<p style='text-align: center'>On YouTube:</p>
|
|
|
35 |
<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>
|
36 |
<p style='text-align: center'>On Medium:</p>
|
37 |
<p style='text-align: center'><a href='https://medium.com/deep-learning-with-keras/how-to-train-a-hugging-face-causal-language-model-from-scratch-8d08d038168f' target='_blank'>How to Train a Hugging Face Causal Language Model from Scratch with a Custom Dataset and a Custom Tokenizer?</a></p>"""
|
38 |
+
examples=["Bir hafta önce aldığım cep telefonu çalışmıyor.",
|
39 |
+
"Tatil için yaptığım rezervasyonu iptal edemiyorum.",
|
40 |
+
"Geçen ay sipariş verdiğim ayakkabı gelmedi.",
|
41 |
+
"Abone olduğum spor salonu kapandı.",
|
42 |
+
"Buzdolabından garip sesler geliyor.",
|
43 |
+
"Otel tam bir fiyasko."]
|
44 |
|
45 |
|
46 |
demo = gr.Interface(fn=generate_review,
|
|
|
57 |
)
|
58 |
|
59 |
|
60 |
+
|
61 |
demo.launch()
|