Spaces:
Runtime error
Runtime error
Dagfinn1962
commited on
Commit
•
8d24732
1
Parent(s):
9e76063
Update app.py
Browse files
app.py
CHANGED
@@ -123,17 +123,14 @@ with gr.Blocks(
|
|
123 |
"""
|
124 |
)
|
125 |
conversation = Chat()
|
126 |
-
with gr.
|
127 |
-
with gr.Column():
|
128 |
# to do: change to openaikey input for public release
|
129 |
openai_key = gr.Textbox(
|
130 |
-
|
131 |
-
value="",
|
132 |
type="password",
|
133 |
placeholder="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",
|
134 |
-
info="",
|
135 |
-
|
136 |
-
)
|
137 |
chatbot = gr.Chatbot().style(height=400)
|
138 |
with gr.Row():
|
139 |
with gr.Column():
|
@@ -181,7 +178,7 @@ with gr.Blocks(
|
|
181 |
queue=False,
|
182 |
).then(
|
183 |
fn=conversation.bot_turn,
|
184 |
-
inputs=[system, chatbot,
|
185 |
outputs=[chatbot],
|
186 |
queue=True,
|
187 |
)
|
|
|
123 |
"""
|
124 |
)
|
125 |
conversation = Chat()
|
126 |
+
with gr.Column():
|
|
|
127 |
# to do: change to openaikey input for public release
|
128 |
openai_key = gr.Textbox(
|
129 |
+
label="OpenAI Key",
|
130 |
+
value="hidden",
|
131 |
type="password",
|
132 |
placeholder="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",
|
133 |
+
info="You have to provide your own OpenAI API key.",
|
|
|
|
|
134 |
chatbot = gr.Chatbot().style(height=400)
|
135 |
with gr.Row():
|
136 |
with gr.Column():
|
|
|
178 |
queue=False,
|
179 |
).then(
|
180 |
fn=conversation.bot_turn,
|
181 |
+
inputs=[system, chatbot, openai_key],
|
182 |
outputs=[chatbot],
|
183 |
queue=True,
|
184 |
)
|