Spaces:
Runtime error
Runtime error
storresbusquets
commited on
Commit
•
5b87039
1
Parent(s):
ad2c8e4
Update app.py
Browse files
app.py
CHANGED
@@ -29,15 +29,14 @@ def greet(token, text):
|
|
29 |
|
30 |
llm = HuggingFacePipeline(pipeline = pipeline, model_kwargs = {'temperature':0})
|
31 |
|
32 |
-
template = """
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
"""
|
37 |
-
|
38 |
prompt = PromptTemplate(template=template, input_variables=["text"])
|
39 |
llm_chain = LLMChain(prompt=prompt, llm=llm)
|
40 |
-
|
|
|
41 |
return llm_chain.run(text)
|
42 |
|
43 |
with gr.Blocks() as demo:
|
|
|
29 |
|
30 |
llm = HuggingFacePipeline(pipeline = pipeline, model_kwargs = {'temperature':0})
|
31 |
|
32 |
+
template = """Write a concise summary of the following:
|
33 |
+
"{text}"
|
34 |
+
CONCISE SUMMARY:"""
|
35 |
+
|
|
|
|
|
36 |
prompt = PromptTemplate(template=template, input_variables=["text"])
|
37 |
llm_chain = LLMChain(prompt=prompt, llm=llm)
|
38 |
+
text = text
|
39 |
+
|
40 |
return llm_chain.run(text)
|
41 |
|
42 |
with gr.Blocks() as demo:
|