Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,8 @@ import base64
|
|
6 |
from io import BytesIO
|
7 |
from PIL import Image
|
8 |
import argparse
|
9 |
-
from vis_python_exe import PythonExecutor
|
10 |
-
from shared_vis_python_exe import
|
11 |
from openai import OpenAI
|
12 |
from typing import Optional, Union
|
13 |
import gradio as gr
|
@@ -244,8 +244,8 @@ def o3_chat(api_key, base_url, question, image):
|
|
244 |
print("done!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
245 |
# 初始化组件
|
246 |
client = OpenAI(api_key=api_key, base_url=base_url)
|
247 |
-
|
248 |
-
executor = SharedRuntimeExecutor(var_whitelist="RETAIN_ALL_VARS")
|
249 |
|
250 |
prompt_template = json.load(open("./prompt_template_vis.json", "r", encoding="utf-8"))
|
251 |
prompt_type = 'vistool'
|
|
|
6 |
from io import BytesIO
|
7 |
from PIL import Image
|
8 |
import argparse
|
9 |
+
# from vis_python_exe import PythonExecutor
|
10 |
+
from shared_vis_python_exe import PythonExecutor
|
11 |
from openai import OpenAI
|
12 |
from typing import Optional, Union
|
13 |
import gradio as gr
|
|
|
244 |
print("done!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
245 |
# 初始化组件
|
246 |
client = OpenAI(api_key=api_key, base_url=base_url)
|
247 |
+
executor = PythonExecutor()
|
248 |
+
# executor = SharedRuntimeExecutor(var_whitelist="RETAIN_ALL_VARS")
|
249 |
|
250 |
prompt_template = json.load(open("./prompt_template_vis.json", "r", encoding="utf-8"))
|
251 |
prompt_type = 'vistool'
|