Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -107,35 +107,53 @@ PLACEHOLDER = (
|
|
107 |
"<p style='font-size:18px;opacity:0.65;'>Ask anything or generate images!</p></div>"
|
108 |
)
|
109 |
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
with gr.
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
[
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
|
140 |
if __name__ == "__main__":
|
141 |
demo.launch()
|
|
|
107 |
"<p style='font-size:18px;opacity:0.65;'>Ask anything or generate images!</p></div>"
|
108 |
)
|
109 |
|
110 |
+
chatbot=gr.Chatbot(height=450, placeholder=PLACEHOLDER, label='Gradio ChatInterface')
|
111 |
+
|
112 |
+
with gr.Blocks(fill_height=True, css=css) as demo:
|
113 |
+
with gr.Column():
|
114 |
+
gr.Markdown(DESCRIPTION)
|
115 |
+
# gr.DuplicateButton(value="Duplicate Space for private use", elem_id="duplicate-button")
|
116 |
+
with gr.Row():
|
117 |
+
with gr.Column(scale=3):
|
118 |
+
gr.ChatInterface(
|
119 |
+
fn=chat_qwen_vl,
|
120 |
+
chatbot=chatbot,
|
121 |
+
fill_height=True,
|
122 |
+
additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False, render=False),
|
123 |
+
additional_inputs=[
|
124 |
+
gr.Slider(minimum=0,
|
125 |
+
maximum=1,
|
126 |
+
step=0.1,
|
127 |
+
value=0.9,
|
128 |
+
label="Temperature",
|
129 |
+
interactive = False,
|
130 |
+
render=False),
|
131 |
+
gr.Slider(minimum=128,
|
132 |
+
maximum=4096,
|
133 |
+
step=1,
|
134 |
+
value=4096,
|
135 |
+
label="Max new tokens",
|
136 |
+
interactive = False,
|
137 |
+
render=False),
|
138 |
+
],
|
139 |
+
examples=[
|
140 |
+
['Create a 3D model of a wooden hammer'],
|
141 |
+
['Create a 3D model of a pyramid in obj format'],
|
142 |
+
['Create a 3D model of a cabinet.'],
|
143 |
+
['Create a low poly 3D model of a coffe cup'],
|
144 |
+
['Create a 3D model of a table.'],
|
145 |
+
["Create a low poly 3D model of a tree."],
|
146 |
+
['Write a python code for sorting.'],
|
147 |
+
['How to setup a human base on Mars? Give short answer.'],
|
148 |
+
['Explain theory of relativity to me like I’m 8 years old.'],
|
149 |
+
['What is 9,000 * 9,000?'],
|
150 |
+
['Create a 3D model of a soda can.'],
|
151 |
+
['Create a 3D model of a sword.'],
|
152 |
+
['Create a 3D model of a wooden barrel'],
|
153 |
+
['Create a 3D model of a chair.']
|
154 |
+
],
|
155 |
+
cache_examples=False,
|
156 |
+
)
|
157 |
|
158 |
if __name__ == "__main__":
|
159 |
demo.launch()
|