Robsonfll commited on
Commit
a25353f
路
verified 路
1 Parent(s): 1da8b47

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +13 -0
src/streamlit_app.py CHANGED
@@ -1,3 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
  import numpy as np
3
  from PIL import Image
 
1
+ import os
2
+
3
+ # Caminho absoluto da pasta /src
4
+ BASE_DIR = os.path.dirname(__file__)
5
+
6
+ # Caminho absoluto do labels.txt
7
+ LABELS_PATH = os.path.join(BASE_DIR, "labels.txt")
8
+
9
+ # Carregar as labels
10
+ with open(LABELS_PATH, "r", encoding="utf-8") as f:
11
+ LABELS = [x.strip() for x in f.readlines()]
12
+
13
+
14
  import streamlit as st
15
  import numpy as np
16
  from PIL import Image