Spaces:
Running
Running
File size: 492 Bytes
80296b4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import streamlit as st
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "deepseek-ai/DeepSeek-V3-Base"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
st.title("DeepSeek Chatbot")
prompt = st.text_input("Enter your message:")
if prompt:
inputs = tokenizer.encode(prompt, return_tensors="pt")
outputs = model.generate(inputs)
response = tokenizer.decode(outputs[0])
st.write(response)
|