Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,10 +19,9 @@ def img2text(url):
|
|
| 19 |
# Describe it using LLM
|
| 20 |
def generate_description(caption):
|
| 21 |
template = """
|
| 22 |
-
You are a
|
| 23 |
-
|
| 24 |
-
CONTEXT: {caption}
|
| 25 |
-
STORY;
|
| 26 |
"""
|
| 27 |
|
| 28 |
prompt = PromptTemplate(template=template, input_variables=["caption"])
|
|
|
|
| 19 |
# Describe it using LLM
|
| 20 |
def generate_description(caption):
|
| 21 |
template = """
|
| 22 |
+
You are a narrator;
|
| 23 |
+
Write a suitable image description of an image captioned as mentioned in Context. Upto 5 bullet points including few historic facts about the image and how the image can be described to a visually impaired user;
|
| 24 |
+
CONTEXT: {caption};
|
|
|
|
| 25 |
"""
|
| 26 |
|
| 27 |
prompt = PromptTemplate(template=template, input_variables=["caption"])
|