AmiDwivedi commited on
Commit
26b21bf
·
verified ·
1 Parent(s): 57169a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -25,17 +25,17 @@ Main goal is to improve the quality of the generated output
25
  """
26
 
27
  import os
28
- if "COLAB_GPU" in os.environ:
29
- print("Installing requirements.")
30
- !pip install -U torch # requires torch 2.1.1+ (for efficient sdpa implementation)
31
- !pip install PyMuPDF # for reading PDFs with Python
32
- !pip install tqdm # for progress bars
33
- !pip install sentence-transformers # for embedding models
34
- !pip install accelerate # for quantization model loading
35
- !pip install bitsandbytes # for quantizing models (less storage space)
36
- !pip install flash-attn --no-build-isolation # for faster attention mechanism = faster LLM inference
37
- !pip install nltk
38
- !pip install spacy
39
 
40
  """# Some common terms to know before we proceed
41
 
@@ -529,9 +529,9 @@ elif gpu_memory_gb > 19.0:
529
  print(f"use_quantization_config set to: {use_quantization_config}")
530
  print(f"model_id set to: {model_id}")
531
 
532
- !pip install huggingface_hub
533
 
534
- !pip install --upgrade transformers
535
 
536
  """Loading the LLM Locally"""
537
 
@@ -809,7 +809,7 @@ print_wrapped(answer)
809
  print(f"Context items:")
810
  context_items
811
 
812
- !pip install gradio
813
 
814
  import gradio as gr
815
 
 
25
  """
26
 
27
  import os
28
+ # if "COLAB_GPU" in os.environ:
29
+ # print("Installing requirements.")
30
+ # !pip install -U torch # requires torch 2.1.1+ (for efficient sdpa implementation)
31
+ # !pip install PyMuPDF # for reading PDFs with Python
32
+ # !pip install tqdm # for progress bars
33
+ # !pip install sentence-transformers # for embedding models
34
+ # !pip install accelerate # for quantization model loading
35
+ # !pip install bitsandbytes # for quantizing models (less storage space)
36
+ # !pip install flash-attn --no-build-isolation # for faster attention mechanism = faster LLM inference
37
+ # !pip install nltk
38
+ # !pip install spacy
39
 
40
  """# Some common terms to know before we proceed
41
 
 
529
  print(f"use_quantization_config set to: {use_quantization_config}")
530
  print(f"model_id set to: {model_id}")
531
 
532
+ # !pip install huggingface_hub
533
 
534
+ # !pip install --upgrade transformers
535
 
536
  """Loading the LLM Locally"""
537
 
 
809
  print(f"Context items:")
810
  context_items
811
 
812
+ # !pip install gradio
813
 
814
  import gradio as gr
815