Spaces:
Running
Running
fix: token
Browse files
components/pro/chatbot/demos/multimodal.py
CHANGED
@@ -16,7 +16,7 @@ from openai import OpenAI
|
|
16 |
|
17 |
client = OpenAI(
|
18 |
base_url='https://api-inference.modelscope.cn/v1/',
|
19 |
-
api_key=os.getenv("
|
20 |
)
|
21 |
|
22 |
model = "Qwen/Qwen2.5-VL-72B-Instruct"
|
|
|
16 |
|
17 |
client = OpenAI(
|
18 |
base_url='https://api-inference.modelscope.cn/v1/',
|
19 |
+
api_key=os.getenv("MODELSCOPE_ACCESS_TOKEN"), # ModelScope Token
|
20 |
)
|
21 |
|
22 |
model = "Qwen/Qwen2.5-VL-72B-Instruct"
|
components/pro/chatbot/demos/thinking.py
CHANGED
@@ -14,7 +14,7 @@ from openai import OpenAI
|
|
14 |
|
15 |
client = OpenAI(
|
16 |
base_url='https://api-inference.modelscope.cn/v1/',
|
17 |
-
api_key=os.getenv("
|
18 |
)
|
19 |
|
20 |
model = "Qwen/QwQ-32B"
|
|
|
14 |
|
15 |
client = OpenAI(
|
16 |
base_url='https://api-inference.modelscope.cn/v1/',
|
17 |
+
api_key=os.getenv("MODELSCOPE_ACCESS_TOKEN"), # ModelScope Token
|
18 |
)
|
19 |
|
20 |
model = "Qwen/QwQ-32B"
|
layout_templates/coder_artifacts/demos/app.py
CHANGED
@@ -154,8 +154,8 @@ class GradioEvents:
|
|
154 |
return gr.update(value=state_value["system_prompt"])
|
155 |
|
156 |
@staticmethod
|
157 |
-
def render_history(
|
158 |
-
return gr.update(value=
|
159 |
|
160 |
@staticmethod
|
161 |
def clear_history(e: gr.EventData, state_value):
|
|
|
154 |
return gr.update(value=state_value["system_prompt"])
|
155 |
|
156 |
@staticmethod
|
157 |
+
def render_history(statue_value):
|
158 |
+
return gr.update(value=statue_value["history"])
|
159 |
|
160 |
@staticmethod
|
161 |
def clear_history(e: gr.EventData, state_value):
|