Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -26,11 +26,11 @@ def generate_story_from_caption(caption):
|
|
26 |
repo_id = "tiiuae/falcon-7b-instruct",
|
27 |
verbose = False,
|
28 |
model_kwargs = {"temperature":0.2, "max_new_tokens": 4000})
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
prompt = PromptTemplate(template=template, input_variables=["scenario"])
|
35 |
#Let's create our LLM chain now
|
36 |
chain = LLMChain(prompt=prompt, llm=llm)
|
|
|
26 |
repo_id = "tiiuae/falcon-7b-instruct",
|
27 |
verbose = False,
|
28 |
model_kwargs = {"temperature":0.2, "max_new_tokens": 4000})
|
29 |
+
template= """You are a story teller.
|
30 |
+
You get a scenario as an input text, and generates a short story out of it.
|
31 |
+
Context: {scenario}
|
32 |
+
Story:
|
33 |
+
"""
|
34 |
prompt = PromptTemplate(template=template, input_variables=["scenario"])
|
35 |
#Let's create our LLM chain now
|
36 |
chain = LLMChain(prompt=prompt, llm=llm)
|