Spaces:
Runtime error
Runtime error
geonmo.gu
commited on
Commit
β’
248a504
1
Parent(s):
4b145c8
refine generated text
Browse files
app.py
CHANGED
@@ -194,7 +194,7 @@ def generate_captions(prompt, num_captions=3):
|
|
194 |
for _ in range(num_captions):
|
195 |
response = requests.post(API_URL, headers=headers, json=payload)
|
196 |
output = response.json()
|
197 |
-
generated_text = output[0]['generated_text'].replace(prompt, '')
|
198 |
bloom_results.append(generated_text)
|
199 |
return bloom_results
|
200 |
|
|
|
194 |
for _ in range(num_captions):
|
195 |
response = requests.post(API_URL, headers=headers, json=payload)
|
196 |
output = response.json()
|
197 |
+
generated_text = output[0]['generated_text'].replace(prompt, '').split('.')[0] + '.'
|
198 |
bloom_results.append(generated_text)
|
199 |
return bloom_results
|
200 |
|