Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -201,7 +201,7 @@ def run(message: dict, history: list[dict], system_prompt: str = "", max_new_tok
|
|
201 |
examples = [
|
202 |
[
|
203 |
{
|
204 |
-
"text": "
|
205 |
"files": [],
|
206 |
}
|
207 |
],
|
@@ -211,12 +211,6 @@ examples = [
|
|
211 |
"files": ["assets/additional-examples/barchart.png"],
|
212 |
}
|
213 |
],
|
214 |
-
[
|
215 |
-
{
|
216 |
-
"text": "What is odd about this video?",
|
217 |
-
"files": ["assets/additional-examples/tmp.mp4"],
|
218 |
-
}
|
219 |
-
],
|
220 |
[
|
221 |
{
|
222 |
"text": "I already have this supplement <image> and I want to buy this one <image>. Any warnings I should know about?",
|
@@ -225,97 +219,32 @@ examples = [
|
|
225 |
],
|
226 |
[
|
227 |
{
|
228 |
-
"text": "
|
229 |
-
"files": [
|
230 |
-
}
|
231 |
-
],
|
232 |
-
[
|
233 |
-
{
|
234 |
-
"text": "Compose a short musical piece inspired by the visual elements of the images.",
|
235 |
-
"files": [
|
236 |
-
"assets/sample-images/07-1.png",
|
237 |
-
"assets/sample-images/07-2.png",
|
238 |
-
"assets/sample-images/07-3.png",
|
239 |
-
"assets/sample-images/07-4.png",
|
240 |
-
],
|
241 |
-
}
|
242 |
-
],
|
243 |
-
[
|
244 |
-
{
|
245 |
-
"text": "Write a short story about what might have happened in this house.",
|
246 |
-
"files": ["assets/sample-images/08.png"],
|
247 |
-
}
|
248 |
-
],
|
249 |
-
[
|
250 |
-
{
|
251 |
-
"text": "Create a short story based on the sequence of images.",
|
252 |
-
"files": [
|
253 |
-
"assets/sample-images/09-1.png",
|
254 |
-
"assets/sample-images/09-2.png",
|
255 |
-
"assets/sample-images/09-3.png",
|
256 |
-
"assets/sample-images/09-4.png",
|
257 |
-
"assets/sample-images/09-5.png",
|
258 |
-
],
|
259 |
-
}
|
260 |
-
],
|
261 |
-
[
|
262 |
-
{
|
263 |
-
"text": "Describe the creatures that would live in this world.",
|
264 |
-
"files": ["assets/sample-images/10.png"],
|
265 |
-
}
|
266 |
-
],
|
267 |
-
[
|
268 |
-
{
|
269 |
-
"text": "Read text in the image.",
|
270 |
-
"files": ["assets/additional-examples/1.png"],
|
271 |
-
}
|
272 |
-
],
|
273 |
-
[
|
274 |
-
{
|
275 |
-
"text": "When is this ticket dated and how much did it cost?",
|
276 |
-
"files": ["assets/additional-examples/2.png"],
|
277 |
-
}
|
278 |
-
],
|
279 |
-
[
|
280 |
-
{
|
281 |
-
"text": "Read the text in the image into markdown.",
|
282 |
-
"files": ["assets/additional-examples/3.png"],
|
283 |
-
}
|
284 |
-
],
|
285 |
-
[
|
286 |
-
{
|
287 |
-
"text": "Evaluate this integral.",
|
288 |
-
"files": ["assets/additional-examples/4.png"],
|
289 |
-
}
|
290 |
-
],
|
291 |
-
[
|
292 |
-
{
|
293 |
-
"text": "caption this image",
|
294 |
-
"files": ["assets/sample-images/01.png"],
|
295 |
}
|
296 |
],
|
297 |
[
|
298 |
{
|
299 |
-
"text": "
|
300 |
-
"files": [
|
301 |
}
|
302 |
],
|
303 |
[
|
304 |
{
|
305 |
-
"text": "
|
306 |
-
"files": [
|
307 |
}
|
308 |
],
|
309 |
[
|
310 |
{
|
311 |
-
"text": "
|
312 |
-
"files": [
|
313 |
}
|
314 |
],
|
315 |
[
|
316 |
{
|
317 |
-
"text": "
|
318 |
-
"files": [
|
319 |
}
|
320 |
],
|
321 |
]
|
@@ -323,8 +252,6 @@ examples = [
|
|
323 |
DESCRIPTION = """\
|
324 |
<img src='https://huggingface.co/spaces/huggingface-projects/gemma-3-12b-it/resolve/main/assets/logo.png' id='logo' />
|
325 |
|
326 |
-
This is a demo of Gemma 3 12B it, a vision language model with outstanding performance on a wide range of tasks.
|
327 |
-
You can upload images, interleaved images and videos. Note that video input only supports single-turn conversation and mp4 input.
|
328 |
"""
|
329 |
|
330 |
demo = gr.ChatInterface(
|
@@ -338,7 +265,7 @@ demo = gr.ChatInterface(
|
|
338 |
gr.Slider(label="Max New Tokens", minimum=100, maximum=2000, step=10, value=700),
|
339 |
],
|
340 |
stop_btn=False,
|
341 |
-
title="Gemma 3
|
342 |
description=DESCRIPTION,
|
343 |
examples=examples,
|
344 |
run_examples_on_click=False,
|
|
|
201 |
examples = [
|
202 |
[
|
203 |
{
|
204 |
+
"text": "Saya perlu berada di Jepang selama 10 hari, untuk pergi ke Tokyo, Kyoto, dan Osaka. Pertimbangkan jumlah tempat wisata di masing-masing kota dan alokasikan jumlah hari untuk setiap kota. Berikan juga rekomendasi transportasi umum.",
|
205 |
"files": [],
|
206 |
}
|
207 |
],
|
|
|
211 |
"files": ["assets/additional-examples/barchart.png"],
|
212 |
}
|
213 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
[
|
215 |
{
|
216 |
"text": "I already have this supplement <image> and I want to buy this one <image>. Any warnings I should know about?",
|
|
|
219 |
],
|
220 |
[
|
221 |
{
|
222 |
+
"text": "Bagaimana pajak karbon dapat berfungsi untuk mengurangi emisi?",
|
223 |
+
"files": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
}
|
225 |
],
|
226 |
[
|
227 |
{
|
228 |
+
"text": "Mengapa tarif FIT yang diindeks berdasarkan biaya produksi PLN dapat menghambat pengembangan energi terbarukan di wilayah seperti Jawa?",
|
229 |
+
"files": [],
|
230 |
}
|
231 |
],
|
232 |
[
|
233 |
{
|
234 |
+
"text": "Jelaskan apa saja yang dimaksud dengan Energi Baru Terbarukan, dan apa saja potensi EBT di Indonesia",
|
235 |
+
"files": [],
|
236 |
}
|
237 |
],
|
238 |
[
|
239 |
{
|
240 |
+
"text": "Berapa target capaian EBT di Indonesia?",
|
241 |
+
"files": [],
|
242 |
}
|
243 |
],
|
244 |
[
|
245 |
{
|
246 |
+
"text": "Apa saja pilar utama dalam Kebijakan Energi Nasional menurut PP 79/2014?",
|
247 |
+
"files": [],
|
248 |
}
|
249 |
],
|
250 |
]
|
|
|
252 |
DESCRIPTION = """\
|
253 |
<img src='https://huggingface.co/spaces/huggingface-projects/gemma-3-12b-it/resolve/main/assets/logo.png' id='logo' />
|
254 |
|
|
|
|
|
255 |
"""
|
256 |
|
257 |
demo = gr.ChatInterface(
|
|
|
265 |
gr.Slider(label="Max New Tokens", minimum=100, maximum=2000, step=10, value=700),
|
266 |
],
|
267 |
stop_btn=False,
|
268 |
+
title="Gemma 3 - Indonesia Energy Transition (DEMO)",
|
269 |
description=DESCRIPTION,
|
270 |
examples=examples,
|
271 |
run_examples_on_click=False,
|