Spaces:
Build error
Build error
Polishing
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ def openai_create(prompt, openai_api_key, temperature):
|
|
31 |
|
32 |
def desc2sheet(desc, openai_api_key, temperature):
|
33 |
if not openai_api_key or openai_api_key == "":
|
34 |
-
return "<pre>Please paste your OpenAI API key</pre>"
|
35 |
|
36 |
html = openai_create(initial_prompt + desc + '\n', openai_api_key, temperature)
|
37 |
return html
|
@@ -48,12 +48,12 @@ with block:
|
|
48 |
with gr.Row():
|
49 |
temperature_slider = gr.Slider(label="GPT Temperature", value=0.0, minimum=0.0, maximum=1.0, step=0.1)
|
50 |
title = gr.Markdown("""<h3><center>GPT-3.5 Table-inator</center></h3>""")
|
51 |
-
openai_api_key_textbox = gr.Textbox(placeholder="Paste your OpenAI API key
|
52 |
show_label=False, lines=1, type='password')
|
53 |
|
54 |
table = gr.Markdown("")
|
55 |
with gr.Row():
|
56 |
-
request = gr.Textbox(label=initial_prompt,
|
57 |
placeholder="Ex: Computer languages")
|
58 |
|
59 |
submit = gr.Button(value="Create", variant="secondary").style(full_width=False)
|
|
|
31 |
|
32 |
def desc2sheet(desc, openai_api_key, temperature):
|
33 |
if not openai_api_key or openai_api_key == "":
|
34 |
+
return "<pre>Please paste your OpenAI API key (see https://beta.openai.com)</pre>"
|
35 |
|
36 |
html = openai_create(initial_prompt + desc + '\n', openai_api_key, temperature)
|
37 |
return html
|
|
|
48 |
with gr.Row():
|
49 |
temperature_slider = gr.Slider(label="GPT Temperature", value=0.0, minimum=0.0, maximum=1.0, step=0.1)
|
50 |
title = gr.Markdown("""<h3><center>GPT-3.5 Table-inator</center></h3>""")
|
51 |
+
openai_api_key_textbox = gr.Textbox(placeholder="Paste your OpenAI API key",
|
52 |
show_label=False, lines=1, type='password')
|
53 |
|
54 |
table = gr.Markdown("")
|
55 |
with gr.Row():
|
56 |
+
request = gr.Textbox(label="GPT prompt: " + initial_prompt,
|
57 |
placeholder="Ex: Computer languages")
|
58 |
|
59 |
submit = gr.Button(value="Create", variant="secondary").style(full_width=False)
|