Spaces:
Paused
Paused
Finally properly working environment variables.
Browse files- .gitignore +1 -1
- app.py +2 -2
.gitignore
CHANGED
@@ -2,4 +2,4 @@
|
|
2 |
/__pycache__
|
3 |
/image
|
4 |
|
5 |
-
start
|
|
|
2 |
/__pycache__
|
3 |
/image
|
4 |
|
5 |
+
start.*
|
app.py
CHANGED
@@ -123,7 +123,7 @@ class ConversationBot:
|
|
123 |
return state, state, f'{txt} {image_filename} '
|
124 |
|
125 |
def init_agent(self, openai_api_key):
|
126 |
-
self.llm = OpenAI(temperature=0, openai_api_key=openai_api_key)
|
127 |
self.agent = initialize_agent(
|
128 |
self.tools,
|
129 |
self.llm,
|
@@ -171,7 +171,7 @@ with gr.Blocks(css="#chatbot {overflow:auto; height:500px;}") as demo:
|
|
171 |
chatbot = gr.Chatbot(elem_id="chatbot", label="Visual ChatGPT")
|
172 |
state = gr.State([])
|
173 |
|
174 |
-
with gr.Row(visible=bot
|
175 |
with gr.Column(scale=0.7):
|
176 |
txt = gr.Textbox(show_label=False, placeholder="Enter text and press enter, or upload an image").style(container=False)
|
177 |
with gr.Column(scale=0.10, min_width=0):
|
|
|
123 |
return state, state, f'{txt} {image_filename} '
|
124 |
|
125 |
def init_agent(self, openai_api_key):
|
126 |
+
self.llm = OpenAI(temperature=0.5, max_tokens=512, openai_api_key=openai_api_key)
|
127 |
self.agent = initialize_agent(
|
128 |
self.tools,
|
129 |
self.llm,
|
|
|
171 |
chatbot = gr.Chatbot(elem_id="chatbot", label="Visual ChatGPT")
|
172 |
state = gr.State([])
|
173 |
|
174 |
+
with gr.Row(visible=getattr(bot, 'agent', False)) as input_raws:
|
175 |
with gr.Column(scale=0.7):
|
176 |
txt = gr.Textbox(show_label=False, placeholder="Enter text and press enter, or upload an image").style(container=False)
|
177 |
with gr.Column(scale=0.10, min_width=0):
|