Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,6 @@ from langchain.prompts.chat import ChatPromptTemplate
|
|
| 4 |
|
| 5 |
import os
|
| 6 |
|
| 7 |
-
|
| 8 |
os.environ["OPENAI_API_KEY"] = os.getenv("k1")
|
| 9 |
|
| 10 |
st.title("Summarization Application :robot_face:")
|
|
@@ -20,7 +19,7 @@ if st.button("Submit"):
|
|
| 20 |
|
| 21 |
llm = ChatOpenAI(model = "gpt-3.5-turbo",temperature = 0)
|
| 22 |
|
| 23 |
-
prompt = ChatPromptTemplate.from_messages([("system","you are an expert summarizer for {lang} text"),
|
| 24 |
("human","{text}")])
|
| 25 |
|
| 26 |
chain = prompt|llm
|
|
|
|
| 4 |
|
| 5 |
import os
|
| 6 |
|
|
|
|
| 7 |
os.environ["OPENAI_API_KEY"] = os.getenv("k1")
|
| 8 |
|
| 9 |
st.title("Summarization Application :robot_face:")
|
|
|
|
| 19 |
|
| 20 |
llm = ChatOpenAI(model = "gpt-3.5-turbo",temperature = 0)
|
| 21 |
|
| 22 |
+
prompt = ChatPromptTemplate.from_messages([("system","you are an expert summarizer for {lang} text."),
|
| 23 |
("human","{text}")])
|
| 24 |
|
| 25 |
chain = prompt|llm
|