Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -39,10 +39,12 @@ import google.generativeai as genai
|
|
39 |
imgur_client_id = os.environ.get('IMGUR_CLIENT_ID')
|
40 |
imgur_client = pyimgur.Imgur(imgur_client_id)
|
41 |
|
42 |
-
|
43 |
-
|
|
|
44 |
app.logger.info(uploaded_image.link)
|
45 |
|
|
|
46 |
|
47 |
GOOGLE_API_KEY = os.environ.get('GOOGLE_API_KEY')
|
48 |
genai.configure(api_key=GOOGLE_API_KEY)
|
|
|
39 |
imgur_client_id = os.environ.get('IMGUR_CLIENT_ID')
|
40 |
imgur_client = pyimgur.Imgur(imgur_client_id)
|
41 |
|
42 |
+
## 下面一段是測試是否imgur會檔huggingface space,測試完可刪除
|
43 |
+
|
44 |
+
uploaded_image = imgur_client.upload_image("/code/mi.png")
|
45 |
app.logger.info(uploaded_image.link)
|
46 |
|
47 |
+
##
|
48 |
|
49 |
GOOGLE_API_KEY = os.environ.get('GOOGLE_API_KEY')
|
50 |
genai.configure(api_key=GOOGLE_API_KEY)
|