# Image Restoration app
Uses Replicate's [Image Restoration](https://replicate.com/collections/image-restoration) model to restore and enhance images.
![home](home.png)
### Stack
- Laravel
- Alpine.js
- Tailwind CSS
- Redis for rate limiting
- DigitalOcean spaces for storage
### Packages and libraries
- [Axios](https://axios-http.com/) for HTTP requests
- [Saloon](https://docs.saloon.dev/) for api calls
### Architecture
![System Diagram](diagram.png)
The user sends a request to the web server with a desired image. The web server will then call our API server, which will upload the image to DigitalOcean spaces and return a URL. Next, we send this URL to Replicate's API for processing and receive the processed image URL in return. We then download the processed image from the URL, save it to DigitalOcean spaces, and return the final URL to the web server. Finally, the web server returns the processed image URL to the user.
The reason behind uploading photos to DigitalOcean spaces is to prevent sending a malicious images to Replicate. also to avoid any extra costs from Replicate if we returned their urls directly to the users.
### Installation
You need to have Replicate's API key and DigitalOcean spaces credentials to run this app.
- Clone the repo
- Run `composer install`
- Run `php artisan serve`
没有合适的资源?快使用搜索试试~ 我知道了~
基于ReplicateAI恢复旧照片的Web服务_PHP_Blade_下载.zip
共92个文件
php:60个
gitignore:12个
png:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 80 浏览量
2023-04-28
13:44:55
上传
评论
收藏 375KB ZIP 举报
温馨提示
基于ReplicateAI恢复旧照片的Web服务_PHP_Blade_下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于ReplicateAI恢复旧照片的Web服务_PHP_Blade_下载.zip (92个子文件)
image-restoration-main
.editorconfig 258B
.gitattributes 186B
resources
js
bootstrap.js 1KB
app.js 22B
css
app.css 0B
views
components
spinner.blade.php 2KB
home.blade.php 6KB
.env.example 1KB
app
Services
ImageUploader.php 1KB
Console
Kernel.php 573B
Providers
EventServiceProvider.php 884B
AuthServiceProvider.php 568B
AppServiceProvider.php 360B
RouteServiceProvider.php 1KB
BroadcastServiceProvider.php 359B
Models
User.php 916B
Http
Integrations
Api
Replicate.php 553B
Replicate
Requests
Predictions.php 1KB
FetchPrediction.php 596B
DTOs
Result.php 723B
PredictionRecord.php 399B
Middleware
TrustHosts.php 379B
VerifyCsrfToken.php 320B
ValidateSignature.php 460B
TrimStrings.php 381B
Authenticate.php 409B
TrustProxies.php 649B
RedirectIfAuthenticated.php 760B
EncryptCookies.php 307B
PreventRequestsDuringMaintenance.php 366B
Kernel.php 3KB
Requests
UploadRequest.php 566B
Controllers
UploadController.php 2KB
Controller.php 299B
Exceptions
Handler.php 1KB
LICENSE 34KB
composer.json 2KB
bootstrap
cache
.gitignore 14B
app.php 2KB
tests
Feature
ExampleTest.php 359B
CreatesApplication.php 375B
TestCase.php 163B
Unit
ExampleTest.php 243B
home.png 87KB
vite.config.js 263B
database
factories
UserFactory.php 956B
migrations
2019_08_19_000000_create_failed_jobs_table.php 768B
2014_10_12_100000_create_password_reset_tokens_table.php 641B
2014_10_12_000000_create_users_table.php 751B
2019_12_14_000001_create_personal_access_tokens_table.php 856B
.gitignore 10B
seeders
DatabaseSeeder.php 471B
package.json 226B
storage
app
public
.gitignore 14B
.gitignore 23B
framework
testing
.gitignore 14B
cache
data
.gitignore 14B
.gitignore 21B
.gitignore 119B
views
.gitignore 14B
sessions
.gitignore 14B
logs
.gitignore 14B
public
.htaccess 603B
robots.txt 24B
favicon.ico 0B
index.php 2KB
diagram.png 99KB
routes
api.php 570B
channels.php 558B
console.php 592B
web.php 273B
diagram.png 141KB
composer.lock 294KB
.gitignore 243B
phpunit.xml 1KB
README.md 1KB
artisan 2KB
config
services.php 97B
auth.php 4KB
queue.php 3KB
cache.php 3KB
hashing.php 2KB
mail.php 4KB
broadcasting.php 2KB
filesystems.php 3KB
database.php 5KB
sanctum.php 2KB
logging.php 4KB
app.php 8KB
view.php 1KB
cors.php 846B
session.php 7KB
共 92 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9152
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功