ProCreations commited on
Commit
8990bcc
·
verified ·
1 Parent(s): 118177d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -26,8 +26,8 @@ tokenizer = None
26
  def initialize_ai_model():
27
  global model, tokenizer
28
  try:
29
- print("🤖 Loading BitNet AI model for personalized welcomes...")
30
- model_id = "microsoft/bitnet-b1.58-2B-4T"
31
  tokenizer = AutoTokenizer.from_pretrained(model_id)
32
  model = AutoModelForCausalLM.from_pretrained(
33
  model_id,
@@ -62,7 +62,7 @@ def store_full_introduction(message_content, author_name):
62
  }
63
 
64
  async def generate_ai_welcome_message(new_members, recent_context):
65
- """Generate a personalized welcome message using BitNet AI with full introduction context"""
66
  if not model or not tokenizer:
67
  return None
68
 
@@ -268,6 +268,6 @@ demo = gr.Interface(
268
  inputs="text",
269
  outputs="text",
270
  title="🤖 AI-Powered Discord Welcome Bot",
271
- description="Enhanced with BitNet b1.58 for personalized community welcomes!"
272
  )
273
- demo.launch()
 
26
  def initialize_ai_model():
27
  global model, tokenizer
28
  try:
29
+ print("🤖 Loading SmolLM2 AI model for personalized welcomes...")
30
+ model_id = "HuggingFaceTB/SmolLM2-360M-Instruct"
31
  tokenizer = AutoTokenizer.from_pretrained(model_id)
32
  model = AutoModelForCausalLM.from_pretrained(
33
  model_id,
 
62
  }
63
 
64
  async def generate_ai_welcome_message(new_members, recent_context):
65
+ """Generate a personalized welcome message using SmolLM2 AI with full introduction context"""
66
  if not model or not tokenizer:
67
  return None
68
 
 
268
  inputs="text",
269
  outputs="text",
270
  title="🤖 AI-Powered Discord Welcome Bot",
271
+ description="Enhanced with SmolLM2-360M-Instruct for personalized community welcomes!"
272
  )
273
+ demo.launch()