yasserrmd commited on
Commit
56a6d2c
·
verified ·
1 Parent(s): 862874c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -3,8 +3,8 @@ import threading
3
  from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig, TextIteratorStreamer
4
 
5
  # Load the model and tokenizer
6
- tokenizer = AutoTokenizer.from_pretrained("SmallDoge/Doge-20M-Instruct")
7
- model = AutoModelForCausalLM.from_pretrained("SmallDoge/Doge-20M-Instruct", trust_remote_code=True)
8
 
9
  # Generation configuration
10
  generation_config = GenerationConfig(
@@ -73,7 +73,7 @@ def chat(user_input, history):
73
 
74
  # Build the Gradio interface
75
  with gr.Blocks() as demo:
76
- gr.Markdown("## Chat with SmallDoge/Doge-20M-Instruct")
77
  chatbot = gr.Chatbot() # displays the conversation as a list of (user, assistant) pairs
78
  with gr.Row():
79
  msg = gr.Textbox(show_label=False, placeholder="Type your message here...")
 
3
  from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig, TextIteratorStreamer
4
 
5
  # Load the model and tokenizer
6
+ tokenizer = AutoTokenizer.from_pretrained("SmallDoge/Doge-20M-checkpoint")
7
+ model = AutoModelForCausalLM.from_pretrained("SmallDoge/Doge-20M-checkpoint", trust_remote_code=True)
8
 
9
  # Generation configuration
10
  generation_config = GenerationConfig(
 
73
 
74
  # Build the Gradio interface
75
  with gr.Blocks() as demo:
76
+ gr.Markdown("## Chat with SmallDoge/Doge-20M-checkpoint")
77
  chatbot = gr.Chatbot() # displays the conversation as a list of (user, assistant) pairs
78
  with gr.Row():
79
  msg = gr.Textbox(show_label=False, placeholder="Type your message here...")