vishalsh13 commited on
Commit
762acfe
·
1 Parent(s): 8332f7a

code update

Browse files
Files changed (2) hide show
  1. app.py +3 -3
  2. requirements.txt +7 -7
app.py CHANGED
@@ -26,8 +26,8 @@ logger = logging.getLogger("LLM-Legal-App")
26
  # 2) Initialize Hugging Face Model
27
  ###############################################################################
28
  def initialize_model():
29
- """Initialize the DocumentCogito model and tokenizer from HuggingFace."""
30
- logger.info("Initializing DocumentCogito model and tokenizer...")
31
  try:
32
  # Access token might be needed for some models
33
  # token = huggingface_hub.get_token()
@@ -487,4 +487,4 @@ if __name__ == "__main__":
487
  logger.info("Initializing Gradio interface...")
488
  demo = build_app()
489
  logger.info("Launching Gradio app.")
490
- demo.launch()
 
26
  # 2) Initialize Hugging Face Model
27
  ###############################################################################
28
  def initialize_model():
29
+ """Initialize the phi-2 model and tokenizer from HuggingFace."""
30
+ logger.info("Initializing phi-2 model and tokenizer...")
31
  try:
32
  # Access token might be needed for some models
33
  # token = huggingface_hub.get_token()
 
487
  logger.info("Initializing Gradio interface...")
488
  demo = build_app()
489
  logger.info("Launching Gradio app.")
490
+ demo.launch(debug=True,share=False)
requirements.txt CHANGED
@@ -1,7 +1,7 @@
1
- gradio>=3.50.2
2
- transformers>=4.35.0
3
- torch>=2.0.0
4
- python-docx>=0.8.11
5
- PyPDF2>=3.0.0
6
- huggingface_hub>=0.19.0
7
- accelerate>=0.20.0
 
1
+ gradio
2
+ transformers
3
+ torch
4
+ python-docx
5
+ PyPDF2
6
+ huggingface_hub
7
+ accelerate