Monimoy commited on
Commit
00e6dce
·
verified ·
1 Parent(s): 193f98b

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,8 +7,8 @@ device = "cpu"
7
  print(f"Using device: {device}")
8
 
9
  # Load the fine-tuned Phi-2 model in 4-bit quantization with CPU support
10
- #model_name = "./fine-tuned-phi2"
11
- model_name = "microsoft/phi-2
12
  model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float32, device_map={"": device})
13
 
14
  # Load tokenizer
@@ -23,7 +23,7 @@ def generate_response(prompt):
23
 
24
  # Define example prompts
25
  examples = [
26
- ["What is the capital of France?"],
27
  ["Explain quantum mechanics in simple terms."],
28
  ["Write a short story about a robot discovering emotions."],
29
  ["Summarize the theory of relativity."]
 
7
  print(f"Using device: {device}")
8
 
9
  # Load the fine-tuned Phi-2 model in 4-bit quantization with CPU support
10
+
11
+ model_name = "Monimoy/phi2-openassistant-lora-final"
12
  model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float32, device_map={"": device})
13
 
14
  # Load tokenizer
 
23
 
24
  # Define example prompts
25
  examples = [
26
+ ["What is machine learning?"],
27
  ["Explain quantum mechanics in simple terms."],
28
  ["Write a short story about a robot discovering emotions."],
29
  ["Summarize the theory of relativity."]