Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,12 +1,15 @@
|
|
| 1 |
import torch
|
| 2 |
import streamlit as st
|
| 3 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
system_message = "Welcome to my Chatbot! Ask me anything."
|
| 6 |
-
|
| 7 |
-
# Display the message using Streamlit's `write` function
|
| 8 |
st.write(system_message)
|
| 9 |
|
|
|
|
| 10 |
# Choose your desired free model from the Hugging Face Hub
|
| 11 |
model_name = "t5-small" # Replace with your choice (e.g., facebook/bart-base or EleutherAI/gpt-neo-125M)
|
| 12 |
|
|
|
|
| 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):
|
| 7 |
+
self.content = content
|
| 8 |
|
| 9 |
+
system_message = SystemMessage("Welcome to my Chatbot! Ask me anything.")
|
|
|
|
|
|
|
| 10 |
st.write(system_message)
|
| 11 |
|
| 12 |
+
|
| 13 |
# Choose your desired free model from the Hugging Face Hub
|
| 14 |
model_name = "t5-small" # Replace with your choice (e.g., facebook/bart-base or EleutherAI/gpt-neo-125M)
|
| 15 |
|