Spaces:
Build error
Build error
Commit
·
5e6fde1
1
Parent(s):
d1eb731
Synced repo using 'sync_with_huggingface' Github Action
Browse files
app.py
CHANGED
|
@@ -23,6 +23,13 @@ def chatbot(key, input, history=[]):
|
|
| 23 |
history.append((input, output))
|
| 24 |
return history, history
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
gr.Interface(fn = chatbot,
|
| 27 |
-
inputs = [
|
| 28 |
-
outputs = ["chatbot",'state']).launch(debug = True)
|
|
|
|
| 23 |
history.append((input, output))
|
| 24 |
return history, history
|
| 25 |
|
| 26 |
+
keyTxt = gr.Textbox(
|
| 27 |
+
show_label=True,
|
| 28 |
+
placeholder=f"Your API-key...",
|
| 29 |
+
type="password",
|
| 30 |
+
visible=True,
|
| 31 |
+
label="API-Key",
|
| 32 |
+
)
|
| 33 |
gr.Interface(fn = chatbot,
|
| 34 |
+
inputs = [keyTxt,"text",'state'],
|
| 35 |
+
outputs = ["chatbot",'state']).launch(debug = True)
|