Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -262,16 +262,17 @@ class QRCodeGenerator:
|
|
| 262 |
with st.expander("Barcode", expanded=True):
|
| 263 |
type = st.selectbox("Select a type", ["code128", "ean13", "ean8", "upc", "isbn10", "isbn13", "pzn", "itf", "codabar", "qr"])
|
| 264 |
number = st.text_input("Enter a number", placeholder="Enter a number here")
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
|
|
|
| 275 |
|
| 276 |
def text_link_qr(self, content: dict):
|
| 277 |
"""
|
|
@@ -378,8 +379,10 @@ class QRCodeGenerator:
|
|
| 378 |
Returns:
|
| 379 |
barcode.barcode.Barcode: The created barcode object.
|
| 380 |
"""
|
| 381 |
-
|
| 382 |
-
|
|
|
|
|
|
|
| 383 |
|
| 384 |
# Start QRCodeGenerator class
|
| 385 |
QRCodeGenerator()
|
|
|
|
| 262 |
with st.expander("Barcode", expanded=True):
|
| 263 |
type = st.selectbox("Select a type", ["code128", "ean13", "ean8", "upc", "isbn10", "isbn13", "pzn", "itf", "codabar", "qr"])
|
| 264 |
number = st.text_input("Enter a number", placeholder="Enter a number here")
|
| 265 |
+
st.error("Contains non-working code parts.")
|
| 266 |
+
# col1, col2 = st.columns(2)
|
| 267 |
+
# if col1.button("Show"):
|
| 268 |
+
# st.session_state.show_barcode = True # Update state
|
| 269 |
+
# input_data = {"Type": type, "Number": number}
|
| 270 |
+
# brcd = self.generate("Barcode", input_data)
|
| 271 |
+
# self.display(brcd)
|
| 272 |
+
# if col2.button("Download"):
|
| 273 |
+
# input_data = {"Type": type, "Number": number}
|
| 274 |
+
# data = self.generate("Barcode", input_data)
|
| 275 |
+
# self.download(data)
|
| 276 |
|
| 277 |
def text_link_qr(self, content: dict):
|
| 278 |
"""
|
|
|
|
| 379 |
Returns:
|
| 380 |
barcode.barcode.Barcode: The created barcode object.
|
| 381 |
"""
|
| 382 |
+
# Gives an error: AttributeError: module 'barcode' has no attribute 'get_barcode'
|
| 383 |
+
# brcd = get_barcode(name=brcode["Type"], code=brcode["Number"], writer=barcode.writer.ImageWriter())
|
| 384 |
+
# return brcd
|
| 385 |
+
pass
|
| 386 |
|
| 387 |
# Start QRCodeGenerator class
|
| 388 |
QRCodeGenerator()
|