Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -43,7 +43,7 @@ def bot(
|
|
43 |
raise ValueError("GOOGLE_API_KEY is not set. Please set it up.")
|
44 |
|
45 |
genai.configure(api_key=google_key)
|
46 |
-
instructions = "You are an expert stylist. You
|
47 |
model_name = 'gemini-pro-vision' if image_prompt else 'gemini-1.5-pro-latest'
|
48 |
|
49 |
if image_prompt:
|
@@ -87,10 +87,9 @@ with gr.Blocks() as demo:
|
|
87 |
gr.HTML(SUBTITLE)
|
88 |
gr.HTML(DUPLICATE)
|
89 |
with gr.Row():
|
90 |
-
|
|
|
91 |
chatbot_component.render()
|
92 |
-
image_prompt_component.render()
|
93 |
-
text_prompt_component.render()
|
94 |
run_button_component.render()
|
95 |
|
96 |
run_button_component.click(
|
@@ -111,4 +110,4 @@ with gr.Blocks() as demo:
|
|
111 |
fn=bot, inputs=bot_inputs, outputs=[chatbot_component]
|
112 |
)
|
113 |
|
114 |
-
demo.launch()
|
|
|
43 |
raise ValueError("GOOGLE_API_KEY is not set. Please set it up.")
|
44 |
|
45 |
genai.configure(api_key=google_key)
|
46 |
+
instructions = "You are an expert stylist. You suggest any style-related question for your client regardless of gender, race, or any other demographic diversity."
|
47 |
model_name = 'gemini-pro-vision' if image_prompt else 'gemini-1.5-pro-latest'
|
48 |
|
49 |
if image_prompt:
|
|
|
87 |
gr.HTML(SUBTITLE)
|
88 |
gr.HTML(DUPLICATE)
|
89 |
with gr.Row():
|
90 |
+
text_prompt_component.render()
|
91 |
+
image_prompt_component.render()
|
92 |
chatbot_component.render()
|
|
|
|
|
93 |
run_button_component.render()
|
94 |
|
95 |
run_button_component.click(
|
|
|
110 |
fn=bot, inputs=bot_inputs, outputs=[chatbot_component]
|
111 |
)
|
112 |
|
113 |
+
demo.launch()
|