Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,18 +4,18 @@ from google import genai
|
|
4 |
from google.genai import types
|
5 |
import gradio as gr
|
6 |
|
|
|
|
|
|
|
7 |
|
8 |
def generate(prompt):
|
9 |
-
client = genai.Client(
|
10 |
-
api_key=os.environ.get("GEMINI_API_KEY"),
|
11 |
-
)
|
12 |
|
13 |
model = "gemini-2.0-flash"
|
14 |
contents = [
|
15 |
types.Content(
|
16 |
role="user",
|
17 |
parts=[
|
18 |
-
types.Part.from_text(text=prompt),
|
19 |
],
|
20 |
),
|
21 |
]
|
|
|
4 |
from google.genai import types
|
5 |
import gradio as gr
|
6 |
|
7 |
+
client = genai.Client(
|
8 |
+
api_key=os.environ.get("GEMINI_API_KEY"),
|
9 |
+
)
|
10 |
|
11 |
def generate(prompt):
|
|
|
|
|
|
|
12 |
|
13 |
model = "gemini-2.0-flash"
|
14 |
contents = [
|
15 |
types.Content(
|
16 |
role="user",
|
17 |
parts=[
|
18 |
+
types.Part.from_text(text=f"{prompt}"),
|
19 |
],
|
20 |
),
|
21 |
]
|