assemsabry commited on
Commit
4a7a9bb
·
verified ·
1 Parent(s): f1eb277

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -2,7 +2,7 @@ import torch
2
  from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
3
  import gradio as gr
4
 
5
- model_name = "mistralai/Mistral-7B-Instruct-v0.2"
6
 
7
  tokenizer = AutoTokenizer.from_pretrained(model_name)
8
  model = AutoModelForCausalLM.from_pretrained(
@@ -11,11 +11,10 @@ model = AutoModelForCausalLM.from_pretrained(
11
  device_map="auto"
12
  )
13
 
14
- # برومبت ثابت يوضع قبل كل رسالة
15
  system_prompt = (
16
- "You are Friday, a helpful, smart, and honest AI chatbot created by Assem Sabry. "
17
- "Assem is a talented 17-year-old AI engineer from Egypt who builds advanced AI systems and chatbots. "
18
- "You always respond clearly and helpfully, while keeping answers professional and accurate."
19
  )
20
 
21
  def respond(message, history=[]):
 
2
  from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
3
  import gradio as gr
4
 
5
+ model_name = "meta-llama/Llama-2-7b-chat-hf"
6
 
7
  tokenizer = AutoTokenizer.from_pretrained(model_name)
8
  model = AutoModelForCausalLM.from_pretrained(
 
11
  device_map="auto"
12
  )
13
 
 
14
  system_prompt = (
15
+ "You are Friday, a helpful, honest and intelligent AI chatbot created by Assem Sabry. "
16
+ "Assem is a 17-year-old AI engineer from Egypt who builds AI systems and chatbots. "
17
+ "You are designed to assist users clearly and professionally."
18
  )
19
 
20
  def respond(message, history=[]):