ahmedembedded commited on
Commit
2d5b06b
Β·
verified Β·
1 Parent(s): a504372

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -1,8 +1,12 @@
 
 
1
  import gradio as gr
2
  from peft import AutoPeftModelForCausalLM
3
  from transformers import AutoTokenizer, BitsAndBytesConfig
4
  import torch
5
 
 
 
6
  # Load the model and tokenizer
7
  model_name = "ahmedembedded/AskFAST"
8
  quantization_config = BitsAndBytesConfig(load_in_4bit=True)
 
1
+ import subprocess
2
+ subprocess.run(["pip", "install", "--no-deps", "xformers<0.0.27", "trl<0.9.0", "peft", "accelerate", "bitsandbytes"])
3
  import gradio as gr
4
  from peft import AutoPeftModelForCausalLM
5
  from transformers import AutoTokenizer, BitsAndBytesConfig
6
  import torch
7
 
8
+ # Install necessary packages via subprocess
9
+
10
  # Load the model and tokenizer
11
  model_name = "ahmedembedded/AskFAST"
12
  quantization_config = BitsAndBytesConfig(load_in_4bit=True)