anji19 commited on
Commit
3af8468
·
verified ·
1 Parent(s): a91c432

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -6,7 +6,9 @@ import google.generativeai as genai
6
  import gradio as gr
7
 
8
  # Configure Google Generative AI
9
- genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
 
 
10
 
11
  # Set up the model with adjusted generation and safety settings
12
  generation_config = {
@@ -16,6 +18,7 @@ generation_config = {
16
  "max_output_tokens": 2048, # Maximum length of the generated text
17
  }
18
 
 
19
  safety_settings = [
20
  {
21
  "category": "HARM_CATEGORY_HARASSMENT",
 
6
  import gradio as gr
7
 
8
  # Configure Google Generative AI
9
+ #genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
10
+ GOOGLE_API_KEY=os.environ.get("google_api_key")
11
+ genai.configure(api_key=(GOOGLE_API_KEY))
12
 
13
  # Set up the model with adjusted generation and safety settings
14
  generation_config = {
 
18
  "max_output_tokens": 2048, # Maximum length of the generated text
19
  }
20
 
21
+
22
  safety_settings = [
23
  {
24
  "category": "HARM_CATEGORY_HARASSMENT",