tharun1507 commited on
Commit
b7c3dfb
·
verified ·
1 Parent(s): 71a8f49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -6,15 +6,14 @@
6
 
7
  #@title DECIPHER THE CODE EXPLAINER
8
  import gradio as gr
9
- import google.generativeai as gemini
10
 
11
  # load model
12
  # PaLM API Key here
13
- gemini.configure(api_key='AIzaSyArybMiPDZARDCz7yZBjzEMx6zXgOXHtoc')
14
  # Use the palm.list_models function to find available models
15
  # PaLM 2 available in 4 sizes: Gecko, Otter, Bison and Unicorn (largest)
16
- models =gemini.GenerativeModel(gemini-1.0-pro)
17
- model = models[0].name
18
  # define completion function
19
  def get_completion(code_snippet):
20
 
@@ -61,7 +60,7 @@ def get_completion(code_snippet):
61
  ```
62
  """
63
 
64
- completion = gemini.generate_text(
65
  model=model,
66
  prompt=prompt,
67
  temperature=0,
 
6
 
7
  #@title DECIPHER THE CODE EXPLAINER
8
  import gradio as gr
9
+ import google.generativeai as genai
10
 
11
  # load model
12
  # PaLM API Key here
13
+ genai.configure(api_key='AIzaSyArybMiPDZARDCz7yZBjzEMx6zXgOXHtoc')
14
  # Use the palm.list_models function to find available models
15
  # PaLM 2 available in 4 sizes: Gecko, Otter, Bison and Unicorn (largest)
16
+ models =genai.GenerativeModel(gemini-1.0-pro)
 
17
  # define completion function
18
  def get_completion(code_snippet):
19
 
 
60
  ```
61
  """
62
 
63
+ completion = genai.generate_text(
64
  model=model,
65
  prompt=prompt,
66
  temperature=0,