Update app.py
Browse files
app.py
CHANGED
@@ -254,7 +254,7 @@ def o3_chat(api_key, base_url, question, image):
|
|
254 |
client = OpenAI(api_key=api_key, base_url=base_url)
|
255 |
executor = PythonExecutor()
|
256 |
|
257 |
-
prompt_template = json.load(open("./
|
258 |
prompt_type = 'vistool'
|
259 |
|
260 |
data = {
|
@@ -275,8 +275,8 @@ def create_demo():
|
|
275 |
|
276 |
with gr.Row():
|
277 |
with gr.Column(scale=1):
|
278 |
-
api_key = gr.Textbox(label="OpenAI API Key", type="password")
|
279 |
-
base_url = gr.Textbox(label="Base URL (optional)", value="https://api.
|
280 |
image_input = gr.Image(type="pil", label="Upload Image")
|
281 |
question = gr.Textbox(label="Question", placeholder="Ask a question about the image...")
|
282 |
submit_btn = gr.Button("Submit")
|
|
|
254 |
client = OpenAI(api_key=api_key, base_url=base_url)
|
255 |
executor = PythonExecutor()
|
256 |
|
257 |
+
prompt_template = json.load(open("./prompt_template_vis.json", "r", encoding="utf-8"))
|
258 |
prompt_type = 'vistool'
|
259 |
|
260 |
data = {
|
|
|
275 |
|
276 |
with gr.Row():
|
277 |
with gr.Column(scale=1):
|
278 |
+
api_key = gr.Textbox(label="OpenAI API Key", type="password", value="sk-kBQuM0gvNBhOHmKz43b3iQut01bsOgg8Pv76eMKguu6jvncm")
|
279 |
+
base_url = gr.Textbox(label="Base URL (optional)", value="https://api.claudeshop.top/v1")
|
280 |
image_input = gr.Image(type="pil", label="Upload Image")
|
281 |
question = gr.Textbox(label="Question", placeholder="Ask a question about the image...")
|
282 |
submit_btn = gr.Button("Submit")
|