Spaces:
Runtime error
Runtime error
Dagfinn1962
commited on
Commit
•
9aff0f1
1
Parent(s):
fa73741
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import openai
|
|
2 |
import time
|
3 |
import logging
|
4 |
import gradio as gr
|
|
|
5 |
|
6 |
|
7 |
#def my_function():
|
@@ -141,17 +142,17 @@ with gr.Blocks(theme='HaleyCH/HaleyCH_Theme') as demo:
|
|
141 |
"""
|
142 |
)
|
143 |
conversation = Chat()
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
chatbot = gr.Chatbot().style(height=400)
|
156 |
with gr.Row():
|
157 |
with gr.Column():
|
|
|
2 |
import time
|
3 |
import logging
|
4 |
import gradio as gr
|
5 |
+
import os
|
6 |
|
7 |
|
8 |
#def my_function():
|
|
|
142 |
"""
|
143 |
)
|
144 |
conversation = Chat()
|
145 |
+
with gr.Row():
|
146 |
+
with gr.Column():
|
147 |
+
openai_key = gr.Textbox(
|
148 |
+
label="OpenAI Key",
|
149 |
+
api_key=os.environ.get('API_KEY'),
|
150 |
+
value ="api_key", # Update with placeholder value
|
151 |
+
type="text",
|
152 |
+
placeholder="",
|
153 |
+
info="",
|
154 |
+
show_label=False,
|
155 |
+
)
|
156 |
chatbot = gr.Chatbot().style(height=400)
|
157 |
with gr.Row():
|
158 |
with gr.Column():
|