deepseekv3 / app.py
jersuxs's picture
Create app.py
80296b4 verified
raw
history blame
492 Bytes
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)