IamVicky111 commited on
Commit
d7df5fa
·
verified ·
1 Parent(s): a5d71b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,6 +1,10 @@
1
  import torch
2
  import streamlit as st
3
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
 
 
 
 
4
  # Define SystemMessage class if needed
5
  class SystemMessage:
6
  def __init__(self, content):
@@ -17,9 +21,6 @@ model_name = "t5-small" # Replace with your choice (e.g., facebook/bart-base or
17
  tokenizer = AutoTokenizer.from_pretrained(model_name)
18
  model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
19
 
20
- # From here down is all the StreamLit UI.
21
- st.set_page_config(page_title="LangChain Demo", page_icon=":robot:")
22
- st.header("Hey, I'm your Chat GPT")
23
 
24
 
25
  if "sessionMessages" not in st.session_state:
 
1
  import torch
2
  import streamlit as st
3
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
4
+ # From here down is all the StreamLit UI.
5
+ st.set_page_config(page_title="LangChain Demo", page_icon=":robot:") # Call it first
6
+ st.header("Hey, I'm your Chat GPT")
7
+
8
  # Define SystemMessage class if needed
9
  class SystemMessage:
10
  def __init__(self, content):
 
21
  tokenizer = AutoTokenizer.from_pretrained(model_name)
22
  model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
23
 
 
 
 
24
 
25
 
26
  if "sessionMessages" not in st.session_state: