elapt1c commited on
Commit
d968e4a
·
verified ·
1 Parent(s): 30a56c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -51,7 +51,7 @@ model = CustomDialoGPT(vocab_size, n_embd, n_head, n_layer)
51
  # Download and load model weights
52
  try:
53
  pth_filepath = hf_hub_download(repo_id=model_repo, filename=model_filename)
54
- checkpoint = torch.load(pth_filepath, map_location=device, weights_only=True)
55
 
56
  # Handle different checkpoint saving formats if needed.
57
  # If your checkpoint is just the state_dict, load it directly.
@@ -113,10 +113,10 @@ iface = gr.Interface( # Changed from gr.ChatInterface to gr.Interface
113
  outputs=gr.Chatbot(), # Explicitly define outputs as gr.Chatbot
114
  title="ElapticAI-1a Chatbot",
115
  description="Simple chatbot interface for ElapticAI-1a model. Talk to the model and see its responses!",
116
- examples=[
117
- ["Hello"],
118
- ["How are you?"],
119
- ["Tell me a joke"]
120
  ]
121
  )
122
 
 
51
  # Download and load model weights
52
  try:
53
  pth_filepath = hf_hub_download(repo_id=model_repo, filename=model_filename)
54
+ checkpoint = torch.load(pth_filepath, map_location=device)
55
 
56
  # Handle different checkpoint saving formats if needed.
57
  # If your checkpoint is just the state_dict, load it directly.
 
113
  outputs=gr.Chatbot(), # Explicitly define outputs as gr.Chatbot
114
  title="ElapticAI-1a Chatbot",
115
  description="Simple chatbot interface for ElapticAI-1a model. Talk to the model and see its responses!",
116
+ examples=[ # Corrected examples format
117
+ ["Hello", "Hi there!"], # Example 1: [user_input, bot_response]
118
+ ["How are you?", "I am doing well, thank you."], # Example 2
119
+ ["Tell me a joke", "Why don't scientists trust atoms? Because they make up everything! 😄"] # Example 3
120
  ]
121
  )
122