Spaces:
Running
Running
MattStammers
commited on
Commit
·
b26c06c
1
Parent(s):
da201b3
working app
Browse files
app.py
CHANGED
@@ -1,16 +1,3 @@
|
|
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,9 +12,6 @@ import yaml
|
|
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 |
|
@@ -365,4 +349,4 @@ iface = gr.Interface(
|
|
365 |
article=hint,
|
366 |
)
|
367 |
|
368 |
-
iface.launch(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import logging
|
2 |
import logging.config
|
3 |
import re
|
|
|
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 |
|
|
|
349 |
article=hint,
|
350 |
)
|
351 |
|
352 |
+
iface.launch()
|