Spaces:
Runtime error
Runtime error
ryanzhangfan
commited on
Commit
•
0bd8053
1
Parent(s):
d4c4fe6
disable resize
Browse files- demo/chat_frontend.py +2 -2
- demo/meta.py +5 -5
demo/chat_frontend.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
# Email : zhangfan@baai.ac.cn
|
7 |
# Institute : Beijing Academy of Artificial Intelligence (BAAI)
|
8 |
# Create On : 2023-12-12 18:05
|
9 |
-
# Last Modified : 2023-12-20 14:
|
10 |
# File Name : chat_frontend.py
|
11 |
# Description :
|
12 |
#
|
@@ -158,7 +158,7 @@ def build_chat(args):
|
|
158 |
temperature = gr.Slider(minimum=0, maximum=1, value=0.7, step=0.05, interactive=True, label="Temperature")
|
159 |
top_k = gr.Slider(minimum=1, maximum=5, value=3, step=1, interactive=True, label="Top K")
|
160 |
top_p = gr.Slider(minimum=0, maximum=1, value=0.9, step=0.05, interactive=True, label="Top P")
|
161 |
-
length_penalty = gr.Slider(minimum=0, maximum=5, value=
|
162 |
num_beams = gr.Slider(minimum=1, maximum=10, value=5, step=1, interactive=True, label="Beam Size")
|
163 |
repetition_penalty = gr.Slider(minimum=1.0, maximum=10.0, value=1.0, step=0.5, interactive=True, label="Repetition Penalty")
|
164 |
num_frames = gr.Number(interactive=True, value=8, maximum=12, label="Num Video Frames")
|
|
|
6 |
# Email : zhangfan@baai.ac.cn
|
7 |
# Institute : Beijing Academy of Artificial Intelligence (BAAI)
|
8 |
# Create On : 2023-12-12 18:05
|
9 |
+
# Last Modified : 2023-12-20 14:25
|
10 |
# File Name : chat_frontend.py
|
11 |
# Description :
|
12 |
#
|
|
|
158 |
temperature = gr.Slider(minimum=0, maximum=1, value=0.7, step=0.05, interactive=True, label="Temperature")
|
159 |
top_k = gr.Slider(minimum=1, maximum=5, value=3, step=1, interactive=True, label="Top K")
|
160 |
top_p = gr.Slider(minimum=0, maximum=1, value=0.9, step=0.05, interactive=True, label="Top P")
|
161 |
+
length_penalty = gr.Slider(minimum=0, maximum=5, value=2, step=0.1, interactive=True, label="Length Penalty")
|
162 |
num_beams = gr.Slider(minimum=1, maximum=10, value=5, step=1, interactive=True, label="Beam Size")
|
163 |
repetition_penalty = gr.Slider(minimum=1.0, maximum=10.0, value=1.0, step=0.5, interactive=True, label="Repetition Penalty")
|
164 |
num_frames = gr.Number(interactive=True, value=8, maximum=12, label="Num Video Frames")
|
demo/meta.py
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
# Email : zhangfan@baai.ac.cn
|
9 |
# Institute : Beijing Academy of Artificial Intelligence (BAAI)
|
10 |
# Create On : 2023-12-12 02:54
|
11 |
-
# Last Modified : 2023-12-20
|
12 |
# File Name : meta.py
|
13 |
# Description :
|
14 |
#
|
@@ -145,11 +145,11 @@ class DataMeta:
|
|
145 |
def build(cls, text=None, image=None, coordinate=None, frames=None, is_error=False, *, resize: bool = True):
|
146 |
ins = cls()
|
147 |
ins.text = text if text != "" else None
|
148 |
-
ins.image = cls.resize(image, force=resize)
|
149 |
-
|
150 |
ins.coordinate = cls.fix(coordinate)
|
151 |
-
ins.frames = cls.resize(frames, force=resize)
|
152 |
-
|
153 |
|
154 |
if is_error:
|
155 |
ins.datatype = DataType.ERROR
|
|
|
8 |
# Email : zhangfan@baai.ac.cn
|
9 |
# Institute : Beijing Academy of Artificial Intelligence (BAAI)
|
10 |
# Create On : 2023-12-12 02:54
|
11 |
+
# Last Modified : 2023-12-20 14:27
|
12 |
# File Name : meta.py
|
13 |
# Description :
|
14 |
#
|
|
|
145 |
def build(cls, text=None, image=None, coordinate=None, frames=None, is_error=False, *, resize: bool = True):
|
146 |
ins = cls()
|
147 |
ins.text = text if text != "" else None
|
148 |
+
# ins.image = cls.resize(image, force=resize)
|
149 |
+
ins.image = image
|
150 |
ins.coordinate = cls.fix(coordinate)
|
151 |
+
# ins.frames = cls.resize(frames, force=resize)
|
152 |
+
ins.frames = frames
|
153 |
|
154 |
if is_error:
|
155 |
ins.datatype = DataType.ERROR
|