Spaces:
Running
Running
Updated model to use
Browse files
app.py
CHANGED
@@ -26,7 +26,8 @@ from transformers import LayoutLMv3FeatureExtractor, LayoutLMv3TokenizerFast, La
|
|
26 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
27 |
|
28 |
TOKENIZER = "microsoft/layoutlmv3-base"
|
29 |
-
MODEL_NAME = "fsommers/layoutlmv3-autofinance-classification-us-v01"
|
|
|
30 |
|
31 |
TESS_OPTIONS = "--psm 3" # Automatic page segmentation for Tesseract
|
32 |
|
@@ -137,4 +138,4 @@ if uploaded_file is not None:
|
|
137 |
})
|
138 |
fig = px.bar(df, x="Label", y="Probability")
|
139 |
st.plotly_chart(fig, use_container_width=True)
|
140 |
-
|
|
|
26 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
27 |
|
28 |
TOKENIZER = "microsoft/layoutlmv3-base"
|
29 |
+
#MODEL_NAME = "fsommers/layoutlmv3-autofinance-classification-us-v01"
|
30 |
+
MODEL_NAME = "fsommers/layoutlmv3-FinDocs-sequence-classification-2-12-5-2934-0.0651"
|
31 |
|
32 |
TESS_OPTIONS = "--psm 3" # Automatic page segmentation for Tesseract
|
33 |
|
|
|
138 |
})
|
139 |
fig = px.bar(df, x="Label", y="Probability")
|
140 |
st.plotly_chart(fig, use_container_width=True)
|
141 |
+
|