jersuxs commited on
Commit
80296b4
·
verified ·
1 Parent(s): b97cbc9

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from transformers import AutoModelForCausalLM, AutoTokenizer
3
+
4
+ model_name = "deepseek-ai/DeepSeek-V3-Base"
5
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
6
+ model = AutoModelForCausalLM.from_pretrained(model_name)
7
+
8
+ st.title("DeepSeek Chatbot")
9
+
10
+ prompt = st.text_input("Enter your message:")
11
+
12
+ if prompt:
13
+ inputs = tokenizer.encode(prompt, return_tensors="pt")
14
+ outputs = model.generate(inputs)
15
+ response = tokenizer.decode(outputs[0])
16
+ st.write(response)