Giter VIP home page Giter VIP logo

dead-internet's Introduction

Dead-Internet

So we all know the classic Dead Internet Theory, and if you're reading this I assume you at least know what an LLM is. Need I say much more? Yeah of course!

This is a little project I threw together in a couple hours that lets you surf a completely fake web! You run a search query in the only non-generated page / and it generates a search results page with fake links that lead to fake websites that lead to more fake websites! It's not perfect, not by a long shot, but it works well enough for me to spend like an hour just going through it and laughing at what it makes.

If you encounter any issues with the search results page, reload and it'll generate a new page. If you get any issues with the other generated pages then try make slight adjustments to the URL to get a different page, right now there isn't yet a way to regenerate a page.

Also when you navigate to the /_export path or kill the server, the JSON of your current internet will be saved to the file internet.json in the root of the project. Right now you can't load it back yet but maybe I'll add that in the future if I want, or you could fork it and add it yourself the code isn't very complicated at all.

How do I run this???

Simple, first install Ollama here, then pull your model of choice. The one I used is Llama 3 8B Instruct which works really well and is very impressive for an 8B model. If you don't want to use Ollama you can use any other OpenAI-compatible server by modifying the client declaration in ReaperEngine.py to link to your server, I recommend llama.cpp's server example for something lightweight, or text-generation-webui for a fully featured LLM web interface.

Due to popular demand and it not being 12am anymore I finally added a requirements.txt file! Now instead of manually installing dependencies you can just run pip install -r requirements.txt in the root of the project and it'll install them all for you!

(If you want to manually install dependenies, follow these instructions) Next you'll need to install Python if you don't already have it, I run Python 3.10.12 (came with my Linux Mint install), then the libraries you'll need are:

Once those are installed, simply run the main.py file and navigate to http://127.0.0.1:5000 or whatever URL Flask gives you and have fun!

Inspiration

I'll admit it, I'm not the most creative person. I got this idea from this reddit comment on r/localllama, so thank you very much commenter!

dead-internet's People

Contributors

sebby37 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dead-internet's Issues

Nothing happens after generation with koboldcpp

I modified the port in "ReaperEngine.py" to be able to work with koboldcpp, however nothing happens after the text generation has finished.
Video is here:
https://github.com/Sebby37/Dead-Internet/assets/53271427/c1376062-f1f9-4e2e-84c9-132ec2b6c0dd

grafik

In the cmd terminal (not the koboldcpp terminal), this pops up after the generation finishes:
127.0.0.1 - - [24/Apr/2024 21:52:37] "GET / HTTP/1.1" 200 -
[2024-04-24 21:52:48,432] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "D:\Programme\Miniconda3\envs\DeadInternet\lib\site-packages\flask\app.py", line 1473, in wsgi_app
response = self.full_dispatch_request()
File "D:\Programme\Miniconda3\envs\DeadInternet\lib\site-packages\flask\app.py", line 882, in full_dispatch_request
rv = self.handle_user_exception(e)
File "D:\Programme\Miniconda3\envs\DeadInternet\lib\site-packages\flask\app.py", line 880, in full_dispatch_request
rv = self.dispatch_request()
File "D:\Programme\Miniconda3\envs\DeadInternet\lib\site-packages\flask\app.py", line 865, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "D:\Dead-Internet\main.py", line 17, in index
return engine.get_search(query)
File "D:\Dead-Internet\ReaperEngine.py", line 76, in get_search
search_page_completion = self.client.chat.completions.create(messages=[
File "D:\Programme\Miniconda3\envs\DeadInternet\lib\site-packages\openai_utils_utils.py", line 277, in wrapper
return func(*args, **kwargs)
File "D:\Programme\Miniconda3\envs\DeadInternet\lib\site-packages\openai\resources\chat\completions.py", line 579, in create
return self._post(
File "D:\Programme\Miniconda3\envs\DeadInternet\lib\site-packages\openai_base_client.py", line 1232, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
File "D:\Programme\Miniconda3\envs\DeadInternet\lib\site-packages\openai_base_client.py", line 921, in request
return self._request(
File "D:\Programme\Miniconda3\envs\DeadInternet\lib\site-packages\openai_base_client.py", line 997, in _request
return self._retry_request(
File "D:\Programme\Miniconda3\envs\DeadInternet\lib\site-packages\openai_base_client.py", line 1045, in _retry_request
return self._request(
File "D:\Programme\Miniconda3\envs\DeadInternet\lib\site-packages\openai_base_client.py", line 997, in _request
return self._retry_request(
File "D:\Programme\Miniconda3\envs\DeadInternet\lib\site-packages\openai_base_client.py", line 1045, in _retry_request
return self._request(
File "D:\Programme\Miniconda3\envs\DeadInternet\lib\site-packages\openai_base_client.py", line 1012, in _request
raise self._make_status_error_from_response(err.response) from None
openai.InternalServerError: Error code: 503 - {'detail': {'msg': 'Server is busy; please try again later.', 'type': 'service_unavailable'}}
127.0.0.1 - - [24/Apr/2024 21:52:48] "GET /?query=Cake HTTP/1.1" 500 -
127.0.0.1 - - [24/Apr/2024 21:58:21] "GET /favicon.ico HTTP/1.1" 200 -
127.0.0.1 - - [24/Apr/2024 22:04:56] "GET /?query=Cake HTTP/1.1" 200 -
127.0.0.1 - - [24/Apr/2024 22:05:11] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [24/Apr/2024 22:05:11] "GET /favicon.ico HTTP/1.1" 200 -
127.0.0.1 - - [24/Apr/2024 22:12:09] "GET /?query=Cake HTTP/1.1" 200 -

Guide generation.

When generating the URLs, generate a website description and use that description to guide the generation of the web page.
Consider using GBNF for this.

add a requirements.txt like a gentleman

haha this is neat, so here's a tip for making running this project simpler:

add a requirements.txt to the root of this project with the following:

beautifulsoup4
openai
Flask

and change the readme.md for people to run:

pip install -r requirements.txt

nice job, ai friend

much faster on M1 Mac with llama.cpp server

FYI -- At least on my M1 Mac, running server (from llama.cpp) with Llama 3 8B is much faster for browsing the Dead Internet. I also tried ollama and LM studio with the same model. I guess I shouldn't be too surprised, but thought it might be useful for others.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.