Spaces:
Running
Running
Commit
·
246a8f5
1
Parent(s):
c5d2cfb
Synced repo using 'sync_with_huggingface' Github Action
Browse files
app.py
CHANGED
@@ -47,10 +47,6 @@ block = gr.Blocks()
|
|
47 |
with block:
|
48 |
gr.Markdown("""<h1><center>Build Yo'own ChatGPT with OpenAI API & Gradio</center></h1>
|
49 |
""")
|
50 |
-
chatbot = gr.Chatbot()
|
51 |
-
message = gr.Textbox(placeholder=prompt)
|
52 |
-
state = gr.State()
|
53 |
-
submit = gr.Button("SEND")
|
54 |
keyTxt = gr.Textbox(
|
55 |
show_label=True,
|
56 |
placeholder=f"Your API-key...",
|
@@ -58,6 +54,10 @@ with block:
|
|
58 |
visible=True,
|
59 |
label="API-Key",
|
60 |
)
|
|
|
|
|
|
|
|
|
61 |
submit.click(chatgpt_clone, inputs=[keyTxt, message, state], outputs=[chatbot, state])
|
62 |
|
63 |
block.launch(debug = True)
|
|
|
47 |
with block:
|
48 |
gr.Markdown("""<h1><center>Build Yo'own ChatGPT with OpenAI API & Gradio</center></h1>
|
49 |
""")
|
|
|
|
|
|
|
|
|
50 |
keyTxt = gr.Textbox(
|
51 |
show_label=True,
|
52 |
placeholder=f"Your API-key...",
|
|
|
54 |
visible=True,
|
55 |
label="API-Key",
|
56 |
)
|
57 |
+
chatbot = gr.Chatbot()
|
58 |
+
message = gr.Textbox(placeholder=prompt)
|
59 |
+
state = gr.State()
|
60 |
+
submit = gr.Button("SEND")
|
61 |
submit.click(chatgpt_clone, inputs=[keyTxt, message, state], outputs=[chatbot, state])
|
62 |
|
63 |
block.launch(debug = True)
|