Spaces:
Runtime error
Runtime error
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -50,13 +50,14 @@ generator = pipeline(
|
|
| 50 |
# LangChain pipeline
|
| 51 |
llm = HuggingFacePipeline(pipeline=generator)
|
| 52 |
prompt = ChatPromptTemplate.from_template(
|
| 53 |
-
"
|
| 54 |
Explain this Python code step-by-step:
|
| 55 |
Use code with caution
|
| 56 |
{code}
|
| 57 |
|
| 58 |
-
|
| 59 |
)
|
|
|
|
| 60 |
parser = StrOutputParser()
|
| 61 |
chain = prompt | llm | parser
|
| 62 |
|
|
|
|
| 50 |
# LangChain pipeline
|
| 51 |
llm = HuggingFacePipeline(pipeline=generator)
|
| 52 |
prompt = ChatPromptTemplate.from_template(
|
| 53 |
+
"Instruction:
|
| 54 |
Explain this Python code step-by-step:
|
| 55 |
Use code with caution
|
| 56 |
{code}
|
| 57 |
|
| 58 |
+
Explanation:"
|
| 59 |
)
|
| 60 |
+
|
| 61 |
parser = StrOutputParser()
|
| 62 |
chain = prompt | llm | parser
|
| 63 |
|