Spaces:
Running
Running
update home (#2)
Browse files- update home (5db58b3268bfa2cf3aa6ee8b88d2e59114c13b2d)
Home.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
* SPDX-License-Identifier: Apache-2.0
|
| 4 |
*/
|
| 5 |
/* tslint:disable */
|
| 6 |
-
import {
|
| 7 |
import {
|
| 8 |
ChevronDown,
|
| 9 |
Library,
|
|
@@ -364,11 +364,9 @@ export default function Home() {
|
|
| 364 |
|
| 365 |
parts.push({text: prompt});
|
| 366 |
|
| 367 |
-
const contents: Content[] = [{role: 'USER', parts}];
|
| 368 |
-
|
| 369 |
const response = await ai.models.generateContent({
|
| 370 |
model: 'gemini-2.5-flash-image-preview',
|
| 371 |
-
contents,
|
| 372 |
config: {
|
| 373 |
responseModalities: [Modality.TEXT, Modality.IMAGE],
|
| 374 |
},
|
|
|
|
| 3 |
* SPDX-License-Identifier: Apache-2.0
|
| 4 |
*/
|
| 5 |
/* tslint:disable */
|
| 6 |
+
import {GoogleGenAI, Modality} from '@google/genai';
|
| 7 |
import {
|
| 8 |
ChevronDown,
|
| 9 |
Library,
|
|
|
|
| 364 |
|
| 365 |
parts.push({text: prompt});
|
| 366 |
|
|
|
|
|
|
|
| 367 |
const response = await ai.models.generateContent({
|
| 368 |
model: 'gemini-2.5-flash-image-preview',
|
| 369 |
+
contents: { parts },
|
| 370 |
config: {
|
| 371 |
responseModalities: [Modality.TEXT, Modality.IMAGE],
|
| 372 |
},
|