Spaces:
Sleeping
Sleeping
ניסוח
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ def inference(image: Image.Image, gemini_api_key: str):
|
|
9 |
ומעדכנת את סרגל ההתקדמות בהתאם.
|
10 |
"""
|
11 |
if not gemini_api_key.strip():
|
12 |
-
raise gr.Error("אנא
|
13 |
|
14 |
progress = gr.Progress() # אובייקט לעדכון ההתקדמות
|
15 |
|
@@ -29,7 +29,7 @@ def inference(image: Image.Image, gemini_api_key: str):
|
|
29 |
title_str = "זיהוי וטשטוש נשים בתמונה"
|
30 |
description_str = """<p style='text-align: right; direction: rtl'>
|
31 |
העלה תמונה, הכנס את מפתח ה־API של Gemini,<br>
|
32 |
-
ולחץ על "הרץ" כדי לזהות ולטשטש נשים בתמונה באופן
|
33 |
</p>
|
34 |
"""
|
35 |
|
@@ -39,10 +39,10 @@ EXAMPLE_IMAGE = "example_images/example.jpg"
|
|
39 |
demo = gr.Interface(
|
40 |
fn=inference,
|
41 |
inputs=[
|
42 |
-
gr.Image(type="pil", label="
|
43 |
gr.Textbox(
|
44 |
label="מפתח API של Gemini",
|
45 |
-
placeholder="
|
46 |
type="password"
|
47 |
)
|
48 |
],
|
|
|
9 |
ומעדכנת את סרגל ההתקדמות בהתאם.
|
10 |
"""
|
11 |
if not gemini_api_key.strip():
|
12 |
+
raise gr.Error("אנא הכנס מפתח API של Gemini על מנת להמשיך")
|
13 |
|
14 |
progress = gr.Progress() # אובייקט לעדכון ההתקדמות
|
15 |
|
|
|
29 |
title_str = "זיהוי וטשטוש נשים בתמונה"
|
30 |
description_str = """<p style='text-align: right; direction: rtl'>
|
31 |
העלה תמונה, הכנס את מפתח ה־API של Gemini,<br>
|
32 |
+
ולחץ על "הרץ" כדי לזהות ולטשטש נשים בתמונה באופן אוטומטי
|
33 |
</p>
|
34 |
"""
|
35 |
|
|
|
39 |
demo = gr.Interface(
|
40 |
fn=inference,
|
41 |
inputs=[
|
42 |
+
gr.Image(type="pil", label="בחר תמונה לניתוח או גרור אותה לכאן"),
|
43 |
gr.Textbox(
|
44 |
label="מפתח API של Gemini",
|
45 |
+
placeholder="הכנס את מפתח ה-API כאן",
|
46 |
type="password"
|
47 |
)
|
48 |
],
|