Spaces:
Runtime error
Runtime error
storresbusquets
commited on
Commit
•
ad2c8e4
1
Parent(s):
b0daf63
Update app.py
Browse files
app.py
CHANGED
@@ -24,8 +24,7 @@ def greet(token, text):
|
|
24 |
top_k=10,
|
25 |
num_return_sequences=1,
|
26 |
eos_token_id=tokenizer.eos_token_id,
|
27 |
-
token=access_token
|
28 |
-
use_safetensors=False
|
29 |
)
|
30 |
|
31 |
llm = HuggingFacePipeline(pipeline = pipeline, model_kwargs = {'temperature':0})
|
@@ -39,9 +38,7 @@ def greet(token, text):
|
|
39 |
prompt = PromptTemplate(template=template, input_variables=["text"])
|
40 |
llm_chain = LLMChain(prompt=prompt, llm=llm)
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
return summary
|
45 |
|
46 |
with gr.Blocks() as demo:
|
47 |
|
|
|
24 |
top_k=10,
|
25 |
num_return_sequences=1,
|
26 |
eos_token_id=tokenizer.eos_token_id,
|
27 |
+
token=access_token
|
|
|
28 |
)
|
29 |
|
30 |
llm = HuggingFacePipeline(pipeline = pipeline, model_kwargs = {'temperature':0})
|
|
|
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:
|
44 |
|