magicwenli commited on
Commit
3a86439
·
verified ·
1 Parent(s): 44e91b6

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. main.py +2 -2
  2. requirements.txt +73 -0
main.py CHANGED
@@ -12,9 +12,9 @@ import google.generativeai as genai
12
 
13
  # 从环境变量中获取API密钥
14
  try:
15
- api_key = os.environ["GEMINI_API_KEY"]
16
  except KeyError:
17
- raise RuntimeError("GEMINI_API_KEY not set in environment. Please get a key from https://aistudio.google.com/app/apikey and set it as an environment variable.")
18
 
19
  genai.configure(api_key=api_key)
20
  model = genai.GenerativeModel('gemini-2.5-flash-preview-05-20')
 
12
 
13
  # 从环境变量中获取API密钥
14
  try:
15
+ api_key = os.environ["apikey"]
16
  except KeyError:
17
+ raise RuntimeError("apikey not set in environment. Please get a key from https://aistudio.google.com/app/apikey and set it as an environment variable.")
18
 
19
  genai.configure(api_key=api_key)
20
  model = genai.GenerativeModel('gemini-2.5-flash-preview-05-20')
requirements.txt ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ annotated-types==0.7.0
3
+ anyio==4.9.0
4
+ audioop-lts==0.2.1
5
+ cachetools==5.5.2
6
+ certifi==2025.6.15
7
+ charset-normalizer==3.4.2
8
+ click==8.2.1
9
+ fastapi==0.115.14
10
+ ffmpy==0.6.0
11
+ filelock==3.18.0
12
+ fsspec==2025.5.1
13
+ google-ai-generativelanguage==0.6.15
14
+ google-api-core==2.25.1
15
+ google-api-python-client==2.174.0
16
+ google-auth==2.40.3
17
+ google-auth-httplib2==0.2.0
18
+ google-generativeai==0.8.5
19
+ googleapis-common-protos==1.70.0
20
+ gradio==5.35.0
21
+ gradio-client==1.10.4
22
+ groovy==0.1.2
23
+ grpcio==1.73.1
24
+ grpcio-status==1.71.2
25
+ h11==0.16.0
26
+ hf-xet==1.1.5
27
+ httpcore==1.0.9
28
+ httplib2==0.22.0
29
+ httpx==0.28.1
30
+ huggingface-hub==0.33.1
31
+ idna==3.10
32
+ jinja2==3.1.6
33
+ markdown-it-py==3.0.0
34
+ markupsafe==3.0.2
35
+ mdurl==0.1.2
36
+ numpy==2.3.1
37
+ orjson==3.10.18
38
+ packaging==25.0
39
+ pandas==2.3.0
40
+ pillow==11.2.1
41
+ proto-plus==1.26.1
42
+ protobuf==5.29.5
43
+ pyasn1==0.6.1
44
+ pyasn1-modules==0.4.2
45
+ pydantic==2.11.7
46
+ pydantic-core==2.33.2
47
+ pydub==0.25.1
48
+ pygments==2.19.2
49
+ pyparsing==3.2.3
50
+ python-dateutil==2.9.0.post0
51
+ python-multipart==0.0.20
52
+ pytz==2025.2
53
+ pyyaml==6.0.2
54
+ requests==2.32.4
55
+ rich==14.0.0
56
+ rsa==4.9.1
57
+ ruff==0.12.1
58
+ safehttpx==0.1.6
59
+ semantic-version==2.10.0
60
+ shellingham==1.5.4
61
+ six==1.17.0
62
+ sniffio==1.3.1
63
+ starlette==0.46.2
64
+ tomlkit==0.13.3
65
+ tqdm==4.67.1
66
+ typer==0.16.0
67
+ typing-extensions==4.14.0
68
+ typing-inspection==0.4.1
69
+ tzdata==2025.2
70
+ uritemplate==4.2.0
71
+ urllib3==2.5.0
72
+ uvicorn==0.35.0
73
+ websockets==15.0.1