Spaces:
Sleeping
Sleeping
Update trans.py
Browse files
trans.py
CHANGED
|
@@ -1,12 +1,3 @@
|
|
| 1 |
-
# -*- coding: utf-8 -*-
|
| 2 |
-
"""trans.ipynb
|
| 3 |
-
|
| 4 |
-
Automatically generated by Colab.
|
| 5 |
-
|
| 6 |
-
Original file is located at
|
| 7 |
-
https://colab.research.google.com/drive/1DExUawe8KCF_gDlXoRH9-cRdEVBkAWpo
|
| 8 |
-
"""
|
| 9 |
-
|
| 10 |
from langchain.prompts.prompt import PromptTemplate
|
| 11 |
from langchain_community.llms import HuggingFaceEndpoint
|
| 12 |
from langchain.chains import LLMChain
|
|
@@ -20,4 +11,4 @@ AI Assistant: Here is the transltion in french
|
|
| 20 |
"""
|
| 21 |
|
| 22 |
prompt = PromptTemplate(input_variables=['input'], template = template_v2)
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from langchain.prompts.prompt import PromptTemplate
|
| 2 |
from langchain_community.llms import HuggingFaceEndpoint
|
| 3 |
from langchain.chains import LLMChain
|
|
|
|
| 11 |
"""
|
| 12 |
|
| 13 |
prompt = PromptTemplate(input_variables=['input'], template = template_v2)
|
| 14 |
+
trans = LLMChain(llm=llm, prompt=prompt)
|