Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,7 +58,7 @@ class NotebookLMTool:
|
|
| 58 |
# --- 步驟 A: 提取文字 (OCR) ---
|
| 59 |
try:
|
| 60 |
resp_text = self.client.models.generate_content(
|
| 61 |
-
model="gemini-2.
|
| 62 |
contents=["Extract all text content from this slide strictly.", img]
|
| 63 |
)
|
| 64 |
page_content = resp_text.text if resp_text.text else "[No Text Found]"
|
|
@@ -74,7 +74,7 @@ class NotebookLMTool:
|
|
| 74 |
try:
|
| 75 |
# 參考你的 JS:使用 responseModalities = ["IMAGE"]
|
| 76 |
resp_img = self.client.models.generate_content(
|
| 77 |
-
model="gemini-2.
|
| 78 |
contents=[
|
| 79 |
"Remove all text from this image. Fill the gaps using the surrounding background texture to make it look clean and natural. Output ONLY the image.",
|
| 80 |
img
|
|
|
|
| 58 |
# --- 步驟 A: 提取文字 (OCR) ---
|
| 59 |
try:
|
| 60 |
resp_text = self.client.models.generate_content(
|
| 61 |
+
model="gemini-2.5-flash",
|
| 62 |
contents=["Extract all text content from this slide strictly.", img]
|
| 63 |
)
|
| 64 |
page_content = resp_text.text if resp_text.text else "[No Text Found]"
|
|
|
|
| 74 |
try:
|
| 75 |
# 參考你的 JS:使用 responseModalities = ["IMAGE"]
|
| 76 |
resp_img = self.client.models.generate_content(
|
| 77 |
+
model="gemini-2.5-flash",
|
| 78 |
contents=[
|
| 79 |
"Remove all text from this image. Fill the gaps using the surrounding background texture to make it look clean and natural. Output ONLY the image.",
|
| 80 |
img
|