streamlit、shiny、gradio、fastapi四个web APP平台体验

Gradio, Streamlit, Dash:AI应用开发的效率之选 本文旨在为希望快速构建AI应用的开发者提供一份清晰的指南,特别针对 Gradio、Streamlit 和 Dash 这三个流行的Python框架进行深入对比。文章将详细阐述每个框架的优点、缺点以及它们各自最适合的应用场景。通过结合代码示例,读者可以直观地理解如何使用这些工具,从而根据自身需求,无论是快速演示模型、构建数据可视化仪表盘还是开发复杂的企业级分析应用,都能做出明智的选择。本文力求通俗易懂,即使是初学者也能轻松掌握,同时又不失深度,帮助读者高效地将AI模型转化为实用的交互式应用。 阅读详情
AI摘要

本文分享了streamlit、shiny、gradio、fastapi四个web APP平台的体验。从用户界面、应用领域、部署便利性等方面进行对比,指出使用R语言选shiny方便,用python四个都可用。还给出使用建议,认为web APP代码简单、花费少、功能广,在AI应用有一定地位。

streamlit、shiny、gradio、fastapi四个web APP平台体验

经常被问的问题就是:web APP平台哪个好?该用哪个?刚开始只有用streamlit和shiny,最近体验了一下gradio和fastapi,今天根据自己的体会尝试着回答一下。

使用R语言的话,用shiny比较方便,使用python的话,四个都可以用。

用户界面

从美观方面来说,最美观的应该是streamlit,字体按钮等颜色搭配都比较鲜艳;shiny有一点“学术气”,方方正正,也有很多主题可以选择;gradio整体比较“素”, 可以用“简洁”来形容;fastapi应该算是没有界面。

从组件的丰富程度来看,shiny应该是最丰富的,网页上还有的都有,像提示按钮,弹出框等都有;streamlit 感觉稍微少一些,但是也足够用,两各都有丰富的第三方库的支持,包括算法的支持和组件的支持,用这两个库的人也是做多的;gradio是最近的比较晚,主要是自身带的一些组件;fastapi没有组件。
在这里插入图片描述

应用领域

shiny主要应用在数据科学领域和机器学习领域,数据处理、统计分析和预测模型构建,还有生物信息学,深度学习的文字、图片和视频的处理较少涉及;streamlit就都有涉及,比较全面一些;gradio也都可以处理,个人感觉偏深度学习一些,对LLM、视频和图片的处理有一些独特的设计,比如streaming形式,用于一边处理一遍显示返回数据;fastapi主要功能是产生API供其它的程序调用,本来觉得在数据科学放,方面没什么用途,最近API可以作为LLM模型调用的组件(工具),用fastAPI部署机器学习模型似乎也有了用武之地,顺便说一句gradio也可生成API。

从界面到部署:四大Web APP框架(Streamlit, Shiny, Gradio, FastAPI)的横向评测与选型指南 本文横向评测了四大Web APP框架(Streamlit, Shiny, Gradio, FastAPI)的界面设计、组件生态、领域适配性和部署方案,帮助开发者根据项目需求做出最佳选择。Streamlit适合快速原型设计,Shiny擅长复杂交互,Gradio在AI任务中表现优异,而FastAPI则是构建高性能API服务的首选。 阅读详情

相关推荐

Gradio、Streamlit和Dash应用场景和功能比较

适合场景相对复杂,想要构建丰富多样交互页面的开发者。简单,只需简单定义输入和输出接口即可快速构建简单的交互页面,更轻松部署模型。适合场景相对简单,想要快速部署应用的开发者。dash的组件类型最为丰富,界面风格多样,可根据个人风格进行定制,可扩展性很强。相对来说学习成本也最高。都可以用来快速开发适合于机器学习和数据分析的轻量APP(网页)。更侧重于仪表盘界面,比如数据分析的展示,它的功能也更强大,支持回调功能。则倾向于机器学习算法APP的开发,尤其适合需要用户单次操作的应用场景。的优势在于可扩展性,相比。

Cachel Wood的博客 2162

开源模型应用落地-Gradio正确集成Fastapi-助力模型交互-入门篇(一)

Gradio与Fastapi正确集成,助力模型推理

以微薄之力,予他人些许温暖. 1万+

Camera Sensor接口协议全解析(六)聚焦onsemi HiSPi接口的技术突破与应用实践

摘要: Onsemi HiSPi是一种高速并行接口协议,专为高分辨率图像传感器设计,具备1600 Mbps传输速率、低功耗和高兼容性特点。通过对比DVP、MIPI CSI-2等主流协议,HiSPi在工业/医疗领域表现突出,支持动态功耗控制、多ROI和CRC校验。其创新架构包含多PHY设计,提供分组SP、流SP等多种工作模式,满足灵活传输需求。实际应用中,HiSPi在PCB缺陷检测(5μm精度)和液晶面板检测(0.3% Mura检出率)等场景展现卓越性能,成为高速成像领域的关键技术。

GateWorld的博客 1440

从CT扫描到3D模型:手把手教你用NII文件在3D Slicer中重建脊柱(附Verse数据集实战)

本文详细介绍了如何利用NII文件在3D Slicer中从CT扫描数据重建脊柱3D模型的全流程,包括环境配置、数据获取、方向校准、结构分割和模型优化等关键步骤。通过Verse数据集实战演示,帮助医学从业者快速掌握医学图像处理技术,提升临床诊疗与教学效率。

weixin_42651281的博客 206

两张 300I Duo 部署 Qwen3.5‑32B

开发者成功使用两张华为300IDuo(共4颗Ascend310P3芯片)部署Qwen3/Qwen3.5的30B/32B模型,并公开详细步骤。关键点包括:硬件需两张300IDuo(每芯片44GB显存),软件需CANN≥24.1和MindIE2.3.0专用镜像。部署流程涵盖驱动安装、模型下载(需修改为FP16格式)、容器启动、张量并行配置(TP=4)等环节。实测显示每芯片显存占用20-35GB,系统稳定运行。该方案已在知乎等平台验证可行,适用于Qwen3.5-32B等同类模型。

evering的博客 2263

s8654

The official Snapdragon Ride SX 4.0 development board provides standardized hardware support for the secondary development and functional verification of the s8654 platform.

qq_39257814的博客 6836

【天工Godwork精品教程】天工3.1.7安装教程(附Godwork完整版下载地址)

本文讲解天工3.1.7安装过程(附Godwork完整版网盘下载地址)。 一、天工3.1.7安装教程 1. 安装GodWork-AT 3.1.7 2. 安装GodWork-AT 3.1.7补丁 3. 安装GodWork-EOS-Setup-2017B-1231 4. 安装GodWork-EOS补丁 5. 运行godwokr软件 6. 生成ZC码 7. 输入ZC码 8. eos插

智慧空间实验室 5295

Oracle EBS R12 AR 标准发票 核心表结构

​ Oracle EBS R12 AR 标准发票 核心表结构 聚焦手动标准发票 (Standard Invoice),按头→行→分配→税→收款计划→会计分录→历史分层,标注主键、外键、关键字段、业务含义,同时说明表间关联关系,适配开发 / 运维 / 数据核对场景。 一、主数据层(发票头 + 行,核心业务表) 1. RA_CUSTOMER_TRX_ALL 【发票头表】 作用:存储整张发票头部信息,一张发票对应一条记录,AR 发票主表。 主键:CUSTOMER_TRX_ID (唯一 ID,系统内部键) 业

金牌架构师 288

RuoYi-Cloud-Plus使用minio进行文件上传图片后无法预览解决_修改minio配置minio桶权限---SpringCloud工作笔记198

在文件管理的位置,发现刚刚上传的图片文件,会显示 预览图片失败 后来经过多方查看,发现是minio的配置的问题。可以看到首先登录RuoYi-Cloud-Plus系统然后,打开文件管理页面可以看到,当上传了图片文件以后。登录以后,选中左侧Buckets,可以看到有自己用的桶,找到以后点击打开。显示文件展示中,文件预览失败,那么这个时候,去修改minio的配置。可以看到,点击配置管理,这里我们启用的是minio对吧。默认是没有配置的这个时候,是允许下载,但不允许预览的.

添柴程序猿的专栏 5570

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

上一篇: 百度千帆平台构建AI APP的基础概念梳理
下一篇: 将机器学习预测模型融入AI agent的尝试(一)
医学AppMatrix
博客等级 码龄7年 1261粉丝 236原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

医学AppMatrix

文中代码请大家随意

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址