Update app.py
Browse files
app.py
CHANGED
|
@@ -26,6 +26,19 @@ from pathlib import Path
|
|
| 26 |
import time
|
| 27 |
import logging
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
# This should be the FIRST Streamlit command
|
| 30 |
st.set_page_config(
|
| 31 |
page_title="AI Invoice Processing System",
|
|
@@ -45,17 +58,6 @@ st.set_page_config(
|
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
-
# Check if running on Hugging Face Spaces
|
| 49 |
-
IS_HF_SPACE = os.getenv("SPACE_ID") is not None
|
| 50 |
-
|
| 51 |
-
# Streamlit and core libraries
|
| 52 |
-
import streamlit as st
|
| 53 |
-
import sqlite3
|
| 54 |
-
import pandas as pd
|
| 55 |
-
import plotly.express as px
|
| 56 |
-
import plotly.graph_objects as go
|
| 57 |
-
import requests
|
| 58 |
-
|
| 59 |
# Vector storage and embeddings (HF compatible)
|
| 60 |
try:
|
| 61 |
import faiss
|
|
|
|
| 26 |
import time
|
| 27 |
import logging
|
| 28 |
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
# Check if running on Hugging Face Spaces
|
| 32 |
+
IS_HF_SPACE = os.getenv("SPACE_ID") is not None
|
| 33 |
+
|
| 34 |
+
# Streamlit and core libraries
|
| 35 |
+
import streamlit as st
|
| 36 |
+
import sqlite3
|
| 37 |
+
import pandas as pd
|
| 38 |
+
import plotly.express as px
|
| 39 |
+
import plotly.graph_objects as go
|
| 40 |
+
import requests
|
| 41 |
+
|
| 42 |
# This should be the FIRST Streamlit command
|
| 43 |
st.set_page_config(
|
| 44 |
page_title="AI Invoice Processing System",
|
|
|
|
| 58 |
|
| 59 |
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
# Vector storage and embeddings (HF compatible)
|
| 62 |
try:
|
| 63 |
import faiss
|