Update app.py
Browse files
app.py
CHANGED
@@ -20,17 +20,17 @@ print("google-generativeai:", genai.__version__)
|
|
20 |
GOOGLE_API_KEY = os.environ.get("GOOGLE_API_KEY")
|
21 |
|
22 |
TITLE = """<h1 align="center">تجربة جزئية إقتراح الآيات من ضياء</h1>"""
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
|
35 |
|
36 |
IMAGE_WIDTH = 512
|
@@ -310,13 +310,13 @@ with gr.Blocks() as demo:
|
|
310 |
chatbot_component.render()
|
311 |
text_prompt_component.render()
|
312 |
run_button_component.render()
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
|
321 |
run_button_component.click(
|
322 |
fn=user,
|
|
|
20 |
GOOGLE_API_KEY = os.environ.get("GOOGLE_API_KEY")
|
21 |
|
22 |
TITLE = """<h1 align="center">تجربة جزئية إقتراح الآيات من ضياء</h1>"""
|
23 |
+
SUBTITLE = """<h2 align="center">Play with Gemini Pro and Gemini Pro Vision API 🖇️</h2>"""
|
24 |
+
DUPLICATE = """
|
25 |
+
<div style="text-align: center; display: flex; justify-content: center; align-items: center;">
|
26 |
+
<a href="https://huggingface.co/spaces/SkalskiP/ChatGemini?duplicate=true">
|
27 |
+
<img src="https://bit.ly/3gLdBN6" alt="Duplicate Space" style="margin-right: 10px;">
|
28 |
+
</a>
|
29 |
+
<span>Duplicate the Space and run securely with your
|
30 |
+
<a href="https://makersuite.google.com/app/apikey">GOOGLE API KEY</a>.
|
31 |
+
</span>
|
32 |
+
</div>
|
33 |
+
"""
|
34 |
|
35 |
|
36 |
IMAGE_WIDTH = 512
|
|
|
310 |
chatbot_component.render()
|
311 |
text_prompt_component.render()
|
312 |
run_button_component.render()
|
313 |
+
with gr.Accordion("Parameters", open=False):
|
314 |
+
temperature_component.render()
|
315 |
+
max_output_tokens_component.render()
|
316 |
+
stop_sequences_component.render()
|
317 |
+
with gr.Accordion("Advanced", open=False):
|
318 |
+
top_k_component.render()
|
319 |
+
top_p_component.render()
|
320 |
|
321 |
run_button_component.click(
|
322 |
fn=user,
|