Streamlit live app & pyserial

How can I run my app using pyserial?

import serial

ser = serial.Serial(port='COM6',
                    baudrate=9600,
                    timeout=2 
)
#rest of the code...