mestreamlit / pages /1_🔥_食品安全比赛提交.py
yuanjie
update
144a16c
raw
history blame
651 Bytes
import paramiko
from meutils.pipe import *
import streamlit as st
host = '222.76.203.180' # 主机
port = 57891 # 端口
sf = paramiko.Transport((host, port))
username = st.text_input('username', 'comp_5154') # 用户名
password = st.text_input('password') # 密码
uploaded_file = st.file_uploader("上传文件")
if uploaded_file is not None and password:
df = pd.read_csv(uploaded_file, '|', header=0)
df.to_csv('result.txt', index=False)
sf.connect(username=username, password=password)
sftp = paramiko.SFTPClient.from_transport(sf)
_ = sftp.put('result.txt', '/result/result.txt')
st.write(_)
st.write(df)