Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,8 @@ import os
|
|
3 |
from google import genai
|
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"),
|
@@ -38,6 +40,8 @@ def generate(prompt, *args):
|
|
38 |
config=generate_content_config,
|
39 |
):
|
40 |
response += chunk.text
|
|
|
|
|
41 |
return response
|
42 |
|
43 |
|
|
|
3 |
from google import genai
|
4 |
from google.genai import types
|
5 |
import gradio as gr
|
6 |
+
from IPython.display import display
|
7 |
+
from IPython.display import Markdown
|
8 |
|
9 |
client = genai.Client(
|
10 |
api_key=os.environ.get("GEMINI_API_KEY"),
|
|
|
40 |
config=generate_content_config,
|
41 |
):
|
42 |
response += chunk.text
|
43 |
+
|
44 |
+
display(Markdown(response))
|
45 |
return response
|
46 |
|
47 |
|