Spaces:
Sleeping
Sleeping
salomonsky
commited on
Commit
路
a0eb8b5
1
Parent(s):
b476686
Update app.py
Browse files
app.py
CHANGED
@@ -8,11 +8,11 @@ from pydub import AudioSegment
|
|
8 |
openai.api_key = os.environ.get ("openai_api_key")
|
9 |
|
10 |
def generate_output(name, date_of_birth, progress=gr.Progress()):
|
11 |
-
prompt = f"{name}, tu
|
12 |
response = openai.Completion.create(
|
13 |
engine="text-davinci-003",
|
14 |
prompt=prompt,
|
15 |
-
max_tokens=
|
16 |
temperature=0.6,
|
17 |
n=1,
|
18 |
stop=None,
|
@@ -56,10 +56,10 @@ iface = gr.Interface(
|
|
56 |
fn=generate_output,
|
57 |
inputs=[
|
58 |
gr.inputs.Textbox(lines=1, label="Nombre", placeholder="Ingresa tu nombre"),
|
59 |
-
gr.inputs.Textbox(lines=1, label="Fecha de Nacimiento", placeholder="DD/MM/AAAA")
|
60 |
],
|
61 |
outputs=[
|
62 |
-
gr.outputs.Video(label="Respuesta de Andrea (
|
63 |
#gr.outputs.Textbox(label="Mensaje de error", type="text")
|
64 |
],
|
65 |
title="Or谩culo de Inteligencia Artificial v2.1",
|
|
|
8 |
openai.api_key = os.environ.get ("openai_api_key")
|
9 |
|
10 |
def generate_output(name, date_of_birth, progress=gr.Progress()):
|
11 |
+
prompt = f"{name}, tu hor贸scopo y or谩culo astrol贸gico de hoy es:"
|
12 |
response = openai.Completion.create(
|
13 |
engine="text-davinci-003",
|
14 |
prompt=prompt,
|
15 |
+
max_tokens=120,
|
16 |
temperature=0.6,
|
17 |
n=1,
|
18 |
stop=None,
|
|
|
56 |
fn=generate_output,
|
57 |
inputs=[
|
58 |
gr.inputs.Textbox(lines=1, label="Nombre", placeholder="Ingresa tu nombre"),
|
59 |
+
gr.inputs.Textbox(lines=1, label="Fecha y Hora de Nacimiento (opcional)", placeholder="DD/MM/AAAA y HH:MM")
|
60 |
],
|
61 |
outputs=[
|
62 |
+
gr.outputs.Video(label="Respuesta de Andrea (dos minutos aproximadamente)").style(width=256),
|
63 |
#gr.outputs.Textbox(label="Mensaje de error", type="text")
|
64 |
],
|
65 |
title="Or谩culo de Inteligencia Artificial v2.1",
|