Spaces:
Sleeping
Sleeping
salomonsky
commited on
Commit
路
23bdb5a
1
Parent(s):
b101782
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def generate_output(name, date_of_birth):
|
|
15 |
prompt = f"Tu carta astral de hoy {name} es:"
|
16 |
input_tokens = tokenizer.encode(prompt, add_special_tokens=False)
|
17 |
input_text = tokenizer.decode(input_tokens)
|
18 |
-
gpt2_output = generator(input_text, max_length=
|
19 |
generated_text = gpt2_output[0]['generated_text']
|
20 |
generated_text = generated_text.replace(input_text, "").strip()
|
21 |
if len(gpt2_output) == 0 or 'generated_text' not in gpt2_output[0]:
|
@@ -63,7 +63,7 @@ iface = gr.Interface(
|
|
63 |
],
|
64 |
outputs=[
|
65 |
gr.outputs.Video(label="Respuesta de Andrea (un minuto aproximadamente)").style(width=256),
|
66 |
-
gr.outputs.Textbox(label="Mensaje de error", type="text")
|
67 |
],
|
68 |
title="Or谩culo de Inteligencia Artificial v2.1",
|
69 |
description="Por favor, ingresa tu nombre y fecha de nacimiento."
|
|
|
15 |
prompt = f"Tu carta astral de hoy {name} es:"
|
16 |
input_tokens = tokenizer.encode(prompt, add_special_tokens=False)
|
17 |
input_text = tokenizer.decode(input_tokens)
|
18 |
+
gpt2_output = generator(input_text, max_length=60, do_sample=True, temperature=0.6)
|
19 |
generated_text = gpt2_output[0]['generated_text']
|
20 |
generated_text = generated_text.replace(input_text, "").strip()
|
21 |
if len(gpt2_output) == 0 or 'generated_text' not in gpt2_output[0]:
|
|
|
63 |
],
|
64 |
outputs=[
|
65 |
gr.outputs.Video(label="Respuesta de Andrea (un minuto aproximadamente)").style(width=256),
|
66 |
+
#gr.outputs.Textbox(label="Mensaje de error", type="text")
|
67 |
],
|
68 |
title="Or谩culo de Inteligencia Artificial v2.1",
|
69 |
description="Por favor, ingresa tu nombre y fecha de nacimiento."
|