CobaltZvc commited on
Commit
1212c0e
1 Parent(s): 7dc29f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -21,6 +21,9 @@ import stability_sdk.interfaces.gooseai.generation.generation_pb2 as generation
21
 
22
  os.environ['STABILITY_HOST'] = 'grpc.stability.ai:443'
23
  os.environ['STABILITY_KEY'] = 'sk-Ndzkpi6OYwM5fQgEJAVwRPbFZSMNyFk0GoZw1EvNtqVExGdi'
 
 
 
24
  stability_api = client.StabilityInference(
25
  key=os.environ['STABILITY_KEY'], # API Key reference.
26
  verbose=True, # Print debug messages.
@@ -36,7 +39,8 @@ def search_internet(question):
36
  "hl": "hi",
37
  "gl": "in",
38
  "google_domain": "google.co.in",
39
- "api_key": "e77d5416608a110ea2babd7b2e33ede48b0c4159ade5cfd5cebbc7483c513ff3"
 
40
  }
41
 
42
  params = {
@@ -45,7 +49,8 @@ def search_internet(question):
45
  "hl": "hi",
46
  "gl": "in",
47
  "google_domain": "google.co.in",
48
- "api_key": "e77d5416608a110ea2babd7b2e33ede48b0c4159ade5cfd5cebbc7483c513ff3"
 
49
  }
50
 
51
  search = GoogleSearch(params)
@@ -75,7 +80,8 @@ def search_internet(question):
75
  st.write(string_temp)
76
  st.write(snippets)
77
 
78
- openai.api_key = "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"
 
79
 
80
  def openai_response(PROMPT):
81
  response = openai.Image.create(
 
21
 
22
  os.environ['STABILITY_HOST'] = 'grpc.stability.ai:443'
23
  os.environ['STABILITY_KEY'] = 'sk-Ndzkpi6OYwM5fQgEJAVwRPbFZSMNyFk0GoZw1EvNtqVExGdi'
24
+ os.environ['GOOGLE_API'] = 'e77d5416608a110ea2babd7b2e33ede48b0c4159ade5cfd5cebbc7483c513ff3'
25
+ os.environ['OPENAI_KEY'] = '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'
26
+
27
  stability_api = client.StabilityInference(
28
  key=os.environ['STABILITY_KEY'], # API Key reference.
29
  verbose=True, # Print debug messages.
 
39
  "hl": "hi",
40
  "gl": "in",
41
  "google_domain": "google.co.in",
42
+ # "api_key": ""
43
+ "api_key": os.environ['GOOGLE_API']
44
  }
45
 
46
  params = {
 
49
  "hl": "hi",
50
  "gl": "in",
51
  "google_domain": "google.co.in",
52
+ # "api_key": ""
53
+ "api_key": os.environ['GOOGLE_API']
54
  }
55
 
56
  search = GoogleSearch(params)
 
80
  st.write(string_temp)
81
  st.write(snippets)
82
 
83
+ # openai.api_key = ""
84
+ openai.api_key = os.environ['OPENAI_KEY']
85
 
86
  def openai_response(PROMPT):
87
  response = openai.Image.create(