Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ tokenizer.pad_token = tokenizer.eos_token
|
|
8 |
model = GPT2LMHeadModel.from_pretrained(model_name)
|
9 |
# parametrelere bağlı olarak text üretmek
|
10 |
generation_config = {
|
11 |
-
'temperature': 0.
|
12 |
"do_sample": True,
|
13 |
"max_new_tokens": 50,
|
14 |
'top_p': 0.9, # Use top-p sampling
|
@@ -26,8 +26,8 @@ def launch(input):
|
|
26 |
iface = gr.Interface(launch,
|
27 |
inputs="text",
|
28 |
outputs="text",
|
29 |
-
title="Text Generation with GPT-2",
|
30 |
-
description="Enter a prompt and generate text using GPT-2.",
|
31 |
theme="default")
|
32 |
|
33 |
iface.launch()
|
|
|
8 |
model = GPT2LMHeadModel.from_pretrained(model_name)
|
9 |
# parametrelere bağlı olarak text üretmek
|
10 |
generation_config = {
|
11 |
+
'temperature': 0.7, # rastgelelik için artırabilirim
|
12 |
"do_sample": True,
|
13 |
"max_new_tokens": 50,
|
14 |
'top_p': 0.9, # Use top-p sampling
|
|
|
26 |
iface = gr.Interface(launch,
|
27 |
inputs="text",
|
28 |
outputs="text",
|
29 |
+
title="Turkish Text Generation with GPT-2",
|
30 |
+
description="Enter a Turkish prompt and generate text using GPT-2.",
|
31 |
theme="default")
|
32 |
|
33 |
iface.launch()
|