Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,6 +7,9 @@ import os
|
|
| 7 |
|
| 8 |
# functions
|
| 9 |
def generate(description, model, max_tokens):
|
|
|
|
|
|
|
|
|
|
| 10 |
headers = {
|
| 11 |
'Content-Type': 'application/json',
|
| 12 |
'Authorization': f'Bearer {os.getenv("API_KEY")}'
|
|
|
|
| 7 |
|
| 8 |
# functions
|
| 9 |
def generate(description, model, max_tokens):
|
| 10 |
+
if not description or not model:
|
| 11 |
+
return ""
|
| 12 |
+
|
| 13 |
headers = {
|
| 14 |
'Content-Type': 'application/json',
|
| 15 |
'Authorization': f'Bearer {os.getenv("API_KEY")}'
|