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
Ronin - Create Fud Meterpreter Payload To Hack Windows 11

Ronin - Create Fud Meterpreter Payload To Hack Windows 11

Dj4w3d H4mm4di 6 May 09, 2022
Black-Scholes library implemented as a Cairo smart contract

Cairo Black-Scholes Library Black-Scholes library implemented as a Cairo smart contract. All inputs, outputs, and internal calculations use 27-digit f

Aditya Raghavan 47 Dec 19, 2022
This is a batch script created to WEB-DL.

widevine-L3-WEB-DL-Script This is a batch script created to WEB-DL. Works well with .mpd files , for m3u8 please use n_m3u8 program (not included in t

Paranjay Singh 312 Dec 31, 2022
The repository is about 100+ python programming exercise problem discussed, explained, and solved in different ways

Break The Ice With Python A journey of 100+ simple yet interesting problems which are explained, solved, discussed in different pythonic ways Introduc

Abdullah Al Masud Tushar 2.2k Jan 04, 2023
NFT generator for Solana!

Solseum NFT Generator for Solana! Check this guide here! Creating your randomized uniques NFTs, getting rarity information and displaying it on a webp

Solseum™ VR NFTs 145 Dec 30, 2022
pybind11 — Seamless operability between C++11 and Python

pybind11 — Seamless operability between C++11 and Python Setuptools example • Scikit-build example • CMake example pybind11 is a lightweight header-on

pybind 12.1k Jan 08, 2023
resultados (data) de elecciones 2021 y código para extraer data de la ONPE

elecciones-peru-2021-ONPE Resultados (data) de elecciones 2021 y código para extraer data de la ONPE Data Licencia liberal, pero si vas a usarlo por f

Ragi Yaser Burhum 21 Jun 14, 2021
30DaysOfCode-PhoenixClub - Solution of everyday coding problem given in 30DaysofCode contest held on Hackerrank

30DaysOfCode-PhoenixClub 👨‍💻 Every day problems solution given in 30DaysOfCode

Urveshkumar 8 Jan 30, 2022
Random Turkish name generator with realistic probabilities.

trnames Random Turkish name generator with realistic probabilities. Based on Trey Hunner's names package. Installation The package can be installed us

Kaan Öztürk 20 Jan 02, 2023
A Trace Explorer for Reverse Engineers

Tenet - A Trace Explorer for Reverse Engineers Overview Tenet is an IDA Pro plugin for exploring execution traces. The goal of this plugin is to provi

1k Jan 02, 2023
Python requirements.txt Guesser

Python-Requirements-Guesser ⚠️ This is alpha quality software. Work in progress Attempt to guess requirements.txt modules versions based on Git histor

Jerome 9 May 24, 2022
The most widely used Python to C compiler

Welcome to Cython! Cython is a language that makes writing C extensions for Python as easy as Python itself. Cython is based on Pyrex, but supports mo

7.6k Jan 03, 2023
This repository contains each day of Advent of Code 2021 that I've done.

Advent of Code - 2021 I will use this repository as my Advent of Code1 (AoC) repo for the 2021 challenge. I'm changing how I am tackling the problems

Brett Chapin 2 Jan 12, 2022
Protocol Buffers for the Rest of Us

Protocol Buffers for the Rest of Us Motivation protoletariat has one goal: fixing the broken imports for the Python code generated by protoc. Usage He

Phillip Cloud 76 Jan 04, 2023
This script provides LIVE feedback for On-The-Fly data collection with RELION

README This script provides LIVE feedback for On-The-Fly data collection with RELION (very useful to explore already processed datasets too!) Creating

cryoEM CNIO 6 Jul 14, 2022
This repository contains various tools useful for offensive operations (reversing, etc) regarding the PE (Portable Executable) format

PE-Tools This repository contains various tools useful for offensive operations (reversing, etc) regarding the PE (Portable Executable) format Install

stark0de 4 Oct 13, 2022
Dump Data from FTDI Serial Port to Binary File on MacOS

Dump Data from FTDI Serial Port to Binary File on MacOS

pandy song 1 Nov 24, 2021
🍕 A small app with capabilities ordering food and listing them with pub/sub pattern

food-ordering A small app with capabilities ordering food and listing them. Prerequisites Docker Run Tests docker-compose run --rm web ./manage.py tes

Muhammet Mücahit 1 Jan 14, 2022
A continuation Of Project Glow By @glowstik-yt

Project Glow Greetings, I see you have stumbled upon project glow. Project glow is an open source bot worked on by many people to create a good and sa

1 Nov 17, 2021
A collection of modern themes for Tkinter TTK

ttkbootstrap A collection of modern flat themes inspired by Bootstrap. Also includes TTK Creator which allows you to easily create and use your own th

Israel Dryer 827 Jan 04, 2023