Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ def Image_to_caption(image,url, greedy = True, model = model_raw):
|
|
30 |
max_new_tokens = 30,
|
31 |
top_k=5)
|
32 |
generated_text = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
33 |
-
openai.api_key =
|
34 |
completion = openai.ChatCompletion.create(
|
35 |
model= "gpt-3.5-turbo",
|
36 |
messages = [{"role":"user","content":f"provide me the top trending hashtags based this text {generated_text} in twitter"}]
|
|
|
30 |
max_new_tokens = 30,
|
31 |
top_k=5)
|
32 |
generated_text = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
33 |
+
openai.api_key = os.environ['API_KEY']
|
34 |
completion = openai.ChatCompletion.create(
|
35 |
model= "gpt-3.5-turbo",
|
36 |
messages = [{"role":"user","content":f"provide me the top trending hashtags based this text {generated_text} in twitter"}]
|