Runnable Python demo of ArtLine

Overview

artline-demo

How to run?

  1. pip3 install -r requirements.txt
  2. python3 app.py

How to use?

  1. Run the Flask app
  2. Open localhost:5000 in browser
  3. Select an image( .png or .jpg ) then click Go Art
  4. Once the process done successfully, you should see the result in browser.

Enjoy and give a star if you like it.

Comments
  • python3.9 pip3 install -r requirements.txt Error

    python3.9 pip3 install -r requirements.txt Error

    Error information

    pip3 install -r requirements.txt

    ERROR: Could not find a version that satisfies the requirement torch==1.6.0 ERROR: No matching distribution found for torch==1.6.0

    Please advise me

    thanks very much!

    opened by chosen1cwp 2
  • Can't run on macos with the below error

    Can't run on macos with the below error

    Traceback (most recent call last): File "app.py", line 29, in pl.load_pkl() File "app.py", line 24, in load_pkl learn = load_learner(path, 'ArtLine_650.pkl') File "/usr/local/lib/python3.7/site-packages/fastai/basic_train.py", line 621, in load_learner state = torch.load(source, map_location='cpu') if defaults.device == torch.device('cpu') else torch.load(source) File "/usr/local/lib/python3.7/site-packages/torch/serialization.py", line 571, in load with _open_file_like(f, 'rb') as opened_file: File "/usr/local/lib/python3.7/site-packages/torch/serialization.py", line 229, in _open_file_like return _open_file(name_or_buffer, mode) File "/usr/local/lib/python3.7/site-packages/torch/serialization.py", line 210, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: 'ArtLine_650.pkl'

    opened by medoer 2
  • No such file or directory: 'ArtLine_650.pkl

    No such file or directory: 'ArtLine_650.pkl

    File "app.py", line 29, in pl.load_pkl() File "app.py", line 24, in load_pkl learn = load_learner(path, 'ArtLine_650.pkl') File "/usr/local/lib/python3.6/site-packages/fastai/basic_train.py", line 621, in load_learner state = torch.load(source, map_location='cpu') if defaults.device == torch.device('cpu') else torch.load(source) File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 571, in load with _open_file_like(f, 'rb') as opened_file: File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 229, in _open_file_like return _open_file(name_or_buffer, mode) File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 210, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: 'ArtLine_650.pkl'

    opened by xwdg 1
  • FileNotFoundError: [Errno 2] No such file or directory: 'ArtLine_650.pkl'

    FileNotFoundError: [Errno 2] No such file or directory: 'ArtLine_650.pkl'

    ~/share/artline-demo$ python3 app.py Traceback (most recent call last): File "app.py", line 29, in pl.load_pkl() File "app.py", line 24, in load_pkl learn = load_learner(path, 'ArtLine_650.pkl') File "/home/mo/.local/lib/python3.6/site-packages/fastai/basic_train.py", line 621, in load_learner state = torch.load(source, map_location='cpu') if defaults.device == torch.device('cpu') else torch.load(source) File "/home/mo/.local/lib/python3.6/site-packages/torch/serialization.py", line 571, in load with _open_file_like(f, 'rb') as opened_file: File "/home/mo/.local/lib/python3.6/site-packages/torch/serialization.py", line 229, in _open_file_like return _open_file(name_or_buffer, mode) File "/home/mo/.local/lib/python3.6/site-packages/torch/serialization.py", line 210, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: 'ArtLine_650.pkl'

    opened by aaaaaaaaala 1
  • No such file or directory: 'ArtLine_650.pkl'

    No such file or directory: 'ArtLine_650.pkl'

    artline-demo git:(main) ✗ python app.py Traceback (most recent call last): File "app.py", line 29, in pl.load_pkl() File "app.py", line 24, in load_pkl learn = load_learner(path, 'ArtLine_650.pkl') File "/Users/lgq/.local/share/virtualenvs/artline-demo-gL78j4yU/lib/python3.7/site-packages/fastai/basic_train.py", line 621, in load_learner state = torch.load(source, map_location='cpu') if defaults.device == torch.device('cpu') else torch.load(source) File "/Users/lgq/.local/share/virtualenvs/artline-demo-gL78j4yU/lib/python3.7/site-packages/torch/serialization.py", line 571, in load with _open_file_like(f, 'rb') as opened_file: File "/Users/lgq/.local/share/virtualenvs/artline-demo-gL78j4yU/lib/python3.7/site-packages/torch/serialization.py", line 229, in _open_file_like return _open_file(name_or_buffer, mode) File "/Users/lgq/.local/share/virtualenvs/artline-demo-gL78j4yU/lib/python3.7/site-packages/torch/serialization.py", line 210, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: 'ArtLine_650.pkl'

    opened by awolfly9 1
  • FileNotFoundError: [Errno 2] No such file or directory: 'tmp/de15864d535c11eb876680fa5b60bc61.png'

    FileNotFoundError: [Errno 2] No such file or directory: 'tmp/de15864d535c11eb876680fa5b60bc61.png'

    At last I have configured the environment successfully, and I accessed localhost:5000 and upload a picture. Then I pressed the go art button, an unexpected error occurred:

    FileNotFoundError: [Errno 2] No such file or directory: 'tmp/0a520bff535e11ebbe7680fa5b60bc61.png'

    Traceback (most recent call last) File "D:\Anaconda\envs\py37\lib\site-packages\flask\app.py", line 2464, in call return self.wsgi_app(environ, start_response) File "D:\Anaconda\envs\py37\lib\site-packages\flask\app.py", line 2450, in wsgi_app response = self.handle_exception(e) File "D:\Anaconda\envs\py37\lib\site-packages\flask\app.py", line 1867, in handle_exception reraise(exc_type, exc_value, tb) File "D:\Anaconda\envs\py37\lib\site-packages\flask_compat.py", line 39, in reraise raise value File "D:\Anaconda\envs\py37\lib\site-packages\flask\app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "D:\Anaconda\envs\py37\lib\site-packages\flask\app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "D:\Anaconda\envs\py37\lib\site-packages\flask\app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "D:\Anaconda\envs\py37\lib\site-packages\flask_compat.py", line 39, in reraise raise value File "D:\Anaconda\envs\py37\lib\site-packages\flask\app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "D:\Anaconda\envs\py37\lib\site-packages\flask\app.py", line 1936, in dispatch_request return self.view_functionsrule.endpoint File "F:\WorkPlace\artline-demo\artline-demo\app.py", line 76, in result_view f.save(local_file) File "D:\Anaconda\envs\py37\lib\site-packages\werkzeug\datastructures.py", line 3066, in save dst = open(dst, "wb") FileNotFoundError: [Errno 2] No such file or directory: 'tmp/0a520bff535e11ebbe7680fa5b60bc61.png'

    I want to know how to solve this error.

    opened by alexitive 0
  • Python 3.6.8  install error

    Python 3.6.8 install error

    No matching distribution found for blis<0.8.0,>=0.4.0 Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/setuptools/installer.py", line 128, in fetch_build_egg

    opened by drduan 1
  • Can't get attribute 'FeatureLoss' on <module '__main__' (built-in)>

    Can't get attribute 'FeatureLoss' on

    Thank you very much for your resources. In Linux environment, Uwsgi deployment, error still occurs: ** Starting uWSGI 2.0.19.1 (64bit) on [Thu Dec 31 18:07:43 2020] *** compiled with version: 5.4.0 20160609 on 17 December 2020 08:16:00 os: Linux-4.4.0-198-generic #230-Ubuntu SMP Sat Nov 28 01:30:29 UTC 2020 nodename: 10-9-60-142 machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 4 current working directory: /home/ubuntu/chengping/artline-demo-main writing pidfile to uwsgi.pid detected binary path: /home/ubuntu/songcheng/venv3.0/bin/uwsgi uWSGI running as root, you can use --uid/--gid/--chroot options *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** chdir() to /home/ubuntu/chengping/artline-demo-main/ your processes number limit is 63944 your memory page size is 4096 bytes detected max file descriptor number: 1000000 lock engine: pthread robust mutexes thunder lock: disabled (you can enable it with --thunder-lock) uwsgi socket 0 bound to TCP address 0.0.0.0:5000 fd 3 uWSGI running as root, you can use --uid/--gid/--chroot options *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** Python version: 3.7.1 (default, Dec 17 2020, 15:23:31) [GCC 5.4.0 20160609] Set PythonHome to /home/ubuntu/songcheng/venv3.0/ Python main interpreter initialized at 0xc51680 uWSGI running as root, you can use --uid/--gid/--chroot options *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** python threads support enabled your server socket listen backlog is limited to 100 connections your mercy for graceful operations on workers is 60 seconds mapped 145840 bytes (142 KB) for 1 cores *** Operational MODE: single process *** uWSGI running as root, you can use --uid/--gid/--chroot options *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** *** uWSGI is running in multiple interpreter mode *** spawned uWSGI master process (pid: 14225) spawned uWSGI worker 1 (pid: 14226, cores: 1) *** Stats server enabled on 0.0.0.0:8383 fd: 9 *** Traceback (most recent call last): File "./app_cpu.py", line 76, in state = torch.load('ArtLine_650.pkl', map_location='cpu') if defaults.device == torch.device('cpu') else torch.load(source) File "/home/ubuntu/venv3.0/lib/python3.7/site-packages/torch/serialization.py", line 584, in load return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args) File "/home/ubuntu/venv3.0/lib/python3.7/site-packages/torch/serialization.py", line 842, in _load result = unpickler.load() AttributeError: Can't get attribute 'FeatureLoss' on <module 'main' (built-in)> unable to load app 0 (mountpoint='') (callable not found or import error) *** no app loaded. going in full dynamic mode ***

    but, In the same situation, I can run my service in Python.

    opened by applech666 3
Releases(v0.1.0)
Owner
Jiang Wenjian
A good code is like a story, not a puzzle.
Jiang Wenjian
Using graph_nets for pion classification and energy regression. Contributions from LLNL and LBNL

nbdev template Use this template to more easily create your nbdev project. If you are using an older version of this template, and want to upgrade to

3 Nov 23, 2022
Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators

Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators. Install

quantumlib 3.6k Jan 07, 2023
RestMapper takes the pain out of integrating with RESTful APIs.

python-restmapper RestMapper takes the pain out of integrating with RESTful APIs. It removes all of the complexity with writing API-specific code, and

Lionheart Software 8 Oct 31, 2020
An easy python calculator for those who want's to know how if statements, loops, and imports works give it a try!

A usefull calculator for any student or anyone who want's to know how to build a simple 2 mode python based calculator.

Antonio Sánchez 1 Jan 06, 2022
The code for 2021 MGTV AI Challenge Anti Stealing Link, and the online result ranks 10th.

赛题介绍 芒果TV-第二届“马栏山杯”国际音视频算法大赛-防盗链 随着业务的发展,芒果的视频内容也深受网友的喜欢,不少视频网站和应用开始盗播芒果的视频内容,盗链网站不经过芒果TV的前端系统,跳过广告播放,且消耗大量的服务器、带宽资源,直接给公司带来了巨大的经济损失,因此防盗链在日常运营中显得尤为重要

tongji40 16 Jun 17, 2022
一个可以自动生成PTGen,MediaInfo,截图,并且生成发布所需内容的脚本

Differential 差速器 一个可以自动生成PTGen,MediaInfo,截图,并且生成发种所需内容的脚本 为什么叫差速器 差速器是汽车上的一种能使左、右轮胎以不同转速转动的结构。使用同样的动力输入,差速器能够输出不同的转速。就如同这个工具之于PT资源,差速器帮你使用同一份资源,输出不同PT

Lei Shi 96 Dec 15, 2022
🛠️ Plugin to integrate Chuy with Poetry

Archived This is bundled with Chuy since v1.3.0. Poetry Chuy Plugin This plugin integrates Chuy with Poetry. Note: This only works in Poetry 1.2.0 or

Eliaz Bobadilla 4 Sep 24, 2021
A Python package to request and process seismic waveform data from Hi-net.

HinetPy is a Python package to simplify tedious data request, download and format conversion tasks related to NIED Hi-net. NIED Hi-net | Source Code |

Dongdong Tian 65 Dec 09, 2022
Python data loader for Solar Orbiter's (SolO) Energetic Particle Detector (EPD).

Data loader (and downloader) for Solar Orbiter/EPD energetic charged particle sensors EPT, HET, and STEP. Supports level 2 and low latency data provided by ESA's Solar Orbiter Archive.

Jan Gieseler 9 Dec 16, 2022
ThinkPHP全日志扫描工具,命令行版和BurpSuite插件版

ThinkPHP3和5日志扫描工具,提供命令行版和BurpSuite插件版,尽可能全的发掘网站日志信息 命令行版 安装 git clone https://github.com/r3change/TPLogScan.git cd TPLogScan/ pip install -r requireme

119 Dec 27, 2022
This is a simple SV calling package for diploid assemblies.

dipdiff This is a simple SV calling package for diploid assemblies. It uses a modified version of svim-asm. The package includes its own version minim

Mikhail Kolmogorov 11 Jan 05, 2023
Code for Crowd counting via unsupervised cross-domain feature adaptation.

CDFA-pytorch Code for Unsupervised crowd counting via cross-domain feature adaptation. Pre-trained models Google Drive Baidu Cloud : t4qc Environment

Guanchen Ding 6 Dec 11, 2022
The Python Fuzzer that the world deserves 🐍

pip3 install frelatage Current release : 0.0.2 The Python Fuzzer that the world deserves Installation | How it works | Features | Use Frelatage | Conf

Rog3r 219 Dec 21, 2022
This library is an ongoing effort towards bringing the data exchanging ability between Java/Scala and Python

PyJava This library is an ongoing effort towards bringing the data exchanging ability between Java/Scala and Python

Byzer 6 Oct 17, 2022
Script to quickly get the metrics from Github repos to analyze.

commit-prefix-analysis Script to quickly get the metrics from Github repos to analyze. Setup Install the Github CLI. You'll know its working when runn

David Carpenter 1 Dec 17, 2022
Controller state monitor plugin for EVA ICS

eva-plugin-cmon Controller status monitor plugin for EVA ICS Monitors connected controllers status in SFA and pushes measurements into an external Inf

Altertech 1 Nov 06, 2021
A framework that let's you compose websites in Python with ease!

Perry Perry = A framework that let's you compose websites in Python with ease! Perry works similar to Qt and Flutter, allowing you to create componen

Linkus 13 Oct 09, 2022
Python implementation of the Learning Time-Series Shapelets method, that learns a shapelet-based time-series classifier with gradient descent.

shaplets Python implementation of the Learning Time-Series Shapelets method by Josif Grabocka et al., that learns a shapelet-based time-series classif

Mohamed Haseeb 187 Dec 14, 2022
Syarat.ID Source Code - Syarat.ID is a content aggregator website

Syarat.ID is a content aggregator website that gathering all informations with the specific keyword: "syarat" from the internet.

Syarat.ID 2 Oct 15, 2021
Python Create Your Own Tool Series

Python Create Your Own Tool Series Hey there! This is an additional Github repository that contains the final product files for each video in my Youtu

Joe Helle 21 Dec 02, 2022