3v324v23 commited on
Commit
865ee96
·
1 Parent(s): 8723d4e

remove configure

Browse files
Files changed (1) hide show
  1. text2image.py +0 -9
text2image.py CHANGED
@@ -2,14 +2,6 @@ import os
2
  from PIL import Image
3
  import gradio as gr
4
  from google import genai
5
- import logging
6
-
7
- # 設定 logging
8
- logging.basicConfig(
9
- filename='app.log',
10
- level=logging.INFO,
11
- format='%(asctime)s - %(levelname)s - %(message)s'
12
- )
13
 
14
  # 初始化 Gemini API
15
  GEMINI_API_KEY = os.environ.get("GEMINI_API_KEY")
@@ -23,7 +15,6 @@ def explain_image(image: Image.Image):
23
  )
24
  # 取出回答
25
  explanation = response.text
26
- logging.info("圖片說明成功取得。")
27
  return explanation
28
 
29
  # Gradio 介面
 
2
  from PIL import Image
3
  import gradio as gr
4
  from google import genai
 
 
 
 
 
 
 
 
5
 
6
  # 初始化 Gemini API
7
  GEMINI_API_KEY = os.environ.get("GEMINI_API_KEY")
 
15
  )
16
  # 取出回答
17
  explanation = response.text
 
18
  return explanation
19
 
20
  # Gradio 介面