Commit
·
762acfe
1
Parent(s):
8332f7a
code update
Browse files- app.py +3 -3
- 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
|
30 |
-
logger.info("Initializing
|
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
|
2 |
-
transformers
|
3 |
-
torch
|
4 |
-
python-docx
|
5 |
-
PyPDF2
|
6 |
-
huggingface_hub
|
7 |
-
accelerate
|
|
|
1 |
+
gradio
|
2 |
+
transformers
|
3 |
+
torch
|
4 |
+
python-docx
|
5 |
+
PyPDF2
|
6 |
+
huggingface_hub
|
7 |
+
accelerate
|