Spaces:
Sleeping
Sleeping
Commit ·
555d0f1
1
Parent(s): 8d63ce3
Update app.py
Browse files7 unmodified lines8910111213143 unmodified lines181920212223247 unmodified linesimport streamlit as stfrom transformers import pipeline, T5Tokenizer, T5ForConditionalGenerationmodel=T5ForConditionalGeneration.from_pretrained("Logeswaransr/results_T5").to("cuda")tokenizer=T5Tokenizer.from_pretrained("Logeswaransr/results_T5")pipe=pipeline('text2text-generation', model=model, tokenizer=tokenizer)3 unmodified linesif 'messages' not in st.session_state:st.session_state.messages=[]st.subheader("Sample Chatbot")for message in st.session_state.messages:with st.chat_message(message['role']):7 unmodified lines8910111213143 unmodified lines181920212223247 unmodified linesimport streamlit as stfrom transformers import pipeline, T5Tokenizer, T5ForConditionalGenerationmodel=T5ForConditionalGeneration.from_pretrained("Logeswaransr/results_T5").to("cpu")tokenizer=T5Tokenizer.from_pretrained("Logeswaransr/results_T5")pipe=pipeline('text2text-generation', model=model, tokenizer=tokenizer)3 unmodified linesif 'messages' not in st.session_state:st.session_state.messages=[]st.subheader("Mine AI")for message in st.session_state.messages:with st.chat_message(message['role']):
app.py+2-2