Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ import google.generativeai as gemini
|
|
| 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 = [m for m in
|
| 17 |
model = models[0].name
|
| 18 |
# define completion function
|
| 19 |
def get_completion(code_snippet):
|
|
|
|
| 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 = [m for m in gemini.list_models() if 'generateText' in m.supported_generation_methods]
|
| 17 |
model = models[0].name
|
| 18 |
# define completion function
|
| 19 |
def get_completion(code_snippet):
|