Erginous_project / summary.py
jobanpreet123's picture
changes summary added
f6c931d
raw
history blame contribute delete
866 Bytes
from langchain.callbacks.base import BaseCallbackHandler
from langchain_cohere import ChatCohere
from langchain.prompts import ChatPromptTemplate
import streamlit as st
from dotenv import load_dotenv
load_dotenv()
def summarize(transcription , llm):
template="""Please provide a brief and concise summary of the key discussion points and outcomes from the meeting transcription. Ensure that the summary captures the main topics, decisions made, action items, and any important next steps or deadlines agreed upon.
The summary should be structured clearly and be easily understandable to those who were not present at the meeting.
Transcription: {transcription}"""
prompt = ChatPromptTemplate.from_template(template)
chain = prompt | llm
response = chain.invoke({'transcription':transcription})
return response