Spaces:
Running
Running
Commit
·
da201b3
1
Parent(s):
b10dafc
final attempt tonight
Browse files
app.py
CHANGED
@@ -1,3 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import logging
|
2 |
import logging.config
|
3 |
import re
|
@@ -12,6 +25,9 @@ import yaml
|
|
12 |
import pteredactyl as pt
|
13 |
from pteredactyl.defaults import change_model # Ensure this import is correct
|
14 |
|
|
|
|
|
|
|
15 |
sample_text = """
|
16 |
1. Dr. Huntington (Patient No: 1234567890) diagnosed Ms. Alzheimer with Alzheimer's disease during her last visit to the Huntington Medical Center on 12/12/2023. The prognosis was grim, but Dr. Huntington assured Ms. Alzheimer that the facility was well-equipped to handle her condition despite the lack of a cure for Alzheimer's.
|
17 |
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
+
# Set environment variables for writable directories
|
4 |
+
os.environ['MPLCONFIGDIR'] = '/tmp/matplotlib'
|
5 |
+
os.environ['TRANSFORMERS_CACHE'] = '/tmp/huggingface'
|
6 |
+
os.makedirs('/tmp/gradio', exist_ok=True) # Ensure the directory exists
|
7 |
+
flagging_dir = '/tmp/gradio/flagged'
|
8 |
+
os.environ['GRADIO_FLAGGING_DIR'] = flagging_dir
|
9 |
+
|
10 |
+
# Create the directory if it doesn't exist
|
11 |
+
os.makedirs(flagging_dir, exist_ok=True)
|
12 |
+
|
13 |
+
# The rest of your imports and code
|
14 |
import logging
|
15 |
import logging.config
|
16 |
import re
|
|
|
25 |
import pteredactyl as pt
|
26 |
from pteredactyl.defaults import change_model # Ensure this import is correct
|
27 |
|
28 |
+
# The rest of your script...
|
29 |
+
|
30 |
+
|
31 |
sample_text = """
|
32 |
1. Dr. Huntington (Patient No: 1234567890) diagnosed Ms. Alzheimer with Alzheimer's disease during her last visit to the Huntington Medical Center on 12/12/2023. The prognosis was grim, but Dr. Huntington assured Ms. Alzheimer that the facility was well-equipped to handle her condition despite the lack of a cure for Alzheimer's.
|
33 |
|