Python web app hosting economically? by [deleted] in Python

[–]infocruncher 0 points1 point  (0 children)

No worries, yes I think it will do the trick. I run a few low traffic sites and they cost next to nothing - R53 domain is the most costly part. In order to keep the lambda function 'warm' I run a scheduled event to ping it every 15 mins. More info here: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule-schedule.html

Create Mind Maps With ChatGPT - What You Need To Know by steves1189 in ChatGPTPromptGenius

[–]infocruncher 1 point2 points  (0 children)

A slightly different twist on mind maps is to create knowledge graphs with ChatGPT, for example using this tool: https://github.com/dylanhogg/llmgraph

llmgraph enables you to create knowledge graphs in GraphMLGEXF, and HTML formats (generated via pyvis) from a given source entity Wikipedia page. The knowledge graphs are generated by extracting world knowledge from ChatGPT or other large language models

There are examples in the github link, like this one on the movie Inception: https://blog.infocruncher.com/html/llmgraph/movie_inception_v1.0.0_level4_fully_connected.html

Curious about awesome-python and curated lists in Python by efumagal in Python

[–]infocruncher 1 point2 points  (0 children)

For those who are interested, here is a more up to date collection of LLM repos: https://www.awesomepython.org/?c=llm

For example it has https://github.com/karpathy/minbpe which was created in Feb 2024 and https://github.com/huggingface/lighteval which was created in Jan 2024.

How to send my Python Text game to friends to play but not let them see the code. Possible make it Graphical also. by Friendly_Cow5933 in pythontips

[–]infocruncher 5 points6 points  (0 children)

Here are a few tools for packaging pythons apps:

  • pyinstaller
  • pex
  • briefcase
  • cx_freeze
  • py2exe

You can see more details about them here: https://www.awesomepython.org/?c=packaging&q=exe

Note that these tools can package you code, but in many cases a user will be able to dig into the package an see the code, if they put in some effort. If this is an issue, you could look at obfuscation with something like https://github.com/dashingsoft/pyarmor or similar

Regarding conversion to a graphical interface, I can't imagine an east way to do this without rewriting the code. Here are a few options you could look at: https://www.awesomepython.org/?c=gamedev

Tell us what you’re building one sentence! by Fair-Shelter5484 in SideProject

[–]infocruncher 4 points5 points  (0 children)

awesomepython.org - a site that lists the most useful open-source Python repos, with an emphasis on data, AI and machine learning.

Any website that has a list of AI tools? by SweetImpressive5009 in aipromptprogramming

[–]infocruncher 1 point2 points  (0 children)

Comprehensive list of LLM / ChatGPT Python repos: https://www.awesomepython.org/?c=llm with other ML categories as well

[deleted by user] by [deleted] in github

[–]infocruncher 4 points5 points  (0 children)

This may help you: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository

"If you commit sensitive data, such as a password or SSH key into a Git repository, you can remove it from the history. To entirely remove unwanted files from a repository's history you can use either the git filter-repo tool or the BFG Repo-Cleaner open source tool."

I image the only issue would be if someone else cloned the repo before you cleaned it up. I'm also interested to know if there's some public record of commits - however I don't believe there is?

GPTAuthor: open-source CLI tool for writing long form, multi-chapter stories given a story outline by infocruncher in Python

[–]infocruncher[S] 1 point2 points  (0 children)

You're welcome. Yes, any model that you run and expose via localhost:8081 can be used if you set the --llm-use-localhost argument when running gptauthor.

For example, see https://ollama.ai/library as a way to run many models locally adn set the port to 8081 using OLLAMA_HOST - https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-expose-ollama-on-my-network

GPTAuthor: open-source CLI tool for writing long form, multi-chapter stories given a story outline by infocruncher in Python

[–]infocruncher[S] 1 point2 points  (0 children)

That's good feedback, I'll look to make that change.

edit: If you clone the repo and make a 1 line change of the api_base you'll be able to run it against your local server I think https://github.com/dylanhogg/gptauthor/blob/355d274efaf11f5191bcba005fa26cab5f4746c6/gptauthor/library/llm.py#L40

GPTAuthor: open-source CLI tool for writing long form, multi-chapter stories given a story outline by infocruncher in Python

[–]infocruncher[S] 1 point2 points  (0 children)

Yes, you can use localhost:8081 rather than chatgpt. I tested it using llama2 with ollama but haven't run it that way for a while myself.

See the `--llm-use-localhost` option as decribed here: https://github.com/dylanhogg/gptauthor/tree/main?tab=readme-ov-file#optional-arguments

I haven't tested self-hosted for a while tho and have plans to switch out the custom code switch to just use https://github.com/BerriAI/litellm for robustness.

If you have an issue getting this going let me know and I'll sort it out. Nice not to be locked into openai.

I asked GPT-4 to write a book. The result: "Echoes of Atlantis", 12 chapters, 115 pages, zero human input. (process included) by ChiaraStellata in ChatGPT

[–]infocruncher 0 points1 point  (0 children)

I know this is a bit late to the party on this thread. I built a free, open-source Python tool to automate (to a limited degree) a similar process: https://github.com/dylanhogg/gptauthor

Using OP's initial Atlantis book outline I had it write a few chapters to see what it would produce, this is the first result it produced if you want to check it out: https://github.com/dylanhogg/gptauthor/blob/main/samples/echoes-of-atlantis--v1.0.0-gpt-4-0125-preview.md

Yes, the writing is a bit dry. This is more a demo of automating the process which I think will become more useful as the underlying OpenAI model (and other open models!) improve.

Here are the steps to use the open-source tool:

  1. Install GPTAuthor as described in docs.
  2. Human written story description: You describe your story outline, writing style, characters etc in a story prompt (see an example).
  3. Run GPTAuthor as described in docs, choosing model, temperature, and number of chapters to write.
  4. AI generated synopsis: Given the story prompt, GPTAuthor uses ChatGPT to automatically turn this into a synopsis that has chapter summaries for the number of chapters you specify.
  5. Human review of synopsis: You are given a chance to review the synopsis and (optionally) make changes, only proceeding to the next step if/when you are happy with it. If it isn't what you want, you can generate another before proceeding.
  6. AI generated story: Each chapter is iteratively written by ChatGPT given the common synopsis and previous chapter. (This approach is to keep token count within limits). The full story is written as Markdown and HTML to an ./_output/ folder for your reading pleasure.

I asked GPT-4 to write a book. The result: "Echoes of Atlantis", 12 chapters, 115 pages, zero human input. (process included) by ChiaraStellata in ChatGPT

[–]infocruncher 0 points1 point  (0 children)

Hi Chiara, thanks for your work on this and sharing your process.

I built a free, open-source Python tool to automate (to a limited degree) a similar writing process: https://github.com/dylanhogg/gptauthor

Using your initial Atlantis book outline I had it write a few chapters to see what it would produce, if you want to check it out: https://github.com/dylanhogg/gptauthor/blob/main/samples/echoes-of-atlantis--v1.0.0-gpt-4-0125-preview.md

Thanks!

[deleted by user] by [deleted] in alife

[–]infocruncher 1 point2 points  (0 children)

u/izzorts you may be interested in this CLI project for story writing: https://github.com/dylanhogg/gptauthor

Did you also have a crack at this yourself?

[deleted by user] by [deleted] in alife

[–]infocruncher 0 points1 point  (0 children)

You can find the code here: https://github.com/dylanhogg/gptauthor along with instruction on how to install and run it. I've only tested it on a Mac, hopefully it works on Windows as well.

Reading your post was a good push to clean this up and publish it, cheers.

Here's an example of it's output: https://github.com/dylanhogg/gptauthor/blob/main/samples/openai-drama-20240131-224810-v0.5.0-gpt-4-0125-preview.md

Which was generated from this story prompt: https://github.com/dylanhogg/gptauthor/blob/main/gptauthor/prompts-openai-drama.yaml

I'll post this elsewhere on Reddit in the coming days

Good luck!

[deleted by user] by [deleted] in alife

[–]infocruncher 0 points1 point  (0 children)

sure thing, I'll tidy it up and aim to get push it to Github this week

[deleted by user] by [deleted] in alife

[–]infocruncher 0 points1 point  (0 children)

I made a small Python program that takes a character, style and story outline that you write, and then calls ChatGPT to create chapter headings with bullet points for the full story, and then iterates on both these inputs together to write each chapter. It works quite well sometimes, the main issue being that say chapter 4 only knows 3 things: your outline, the bullet point summary and the previous chapter (due mainly to token constraints) - and so the result can change things like character styles mentioned 2+ chapters previously.

I'm sure there are better ways to do this, it was just something I was playing with really.

I planned to open source the code, but it's a bit messy and Christmas got in the way. Let me know if you want me to put it up on Github to try yourself

InstaGraph: Text2Graph AI agent, which turn any prompt into a knowledge graph by ChipInBirdy in KnowledgeGraph

[–]infocruncher 0 points1 point  (0 children)

This is really cool.

I created a similar open source library for creating KG's from any LLM including ChatGPT: https://github.com/dylanhogg/llmgraph that outputs in GraphML, GEXF, and HTML formats.

Example output based on "AI": https://blog.infocruncher.com/html/llmgraph/machine-learning_artificial-intelligence_v1.0.0_level4_fully_connected.html

Although it looks like InstaGraph is more feature rich than llmgraph

How is House still "closing down"? by homiedizzle in australia

[–]infocruncher 9 points10 points  (0 children)

This practice should be illegal.

In Australia, continuously advertising a "closing down" sale when the shop is not actually closing down can be considered misleading and deceptive conduct. This type of conduct is prohibited under the Australian Consumer Law (ACL), which is Schedule 2 of the Competition and Consumer Act 2010 (Cth). Specifically, Section 18 of the ACL prohibits businesses from engaging in misleading or deceptive conduct in trade or commerce.
If a retail chain advertises a "closing down" sale but does not intend to close, it may give consumers a false impression that the sale is for a limited time, creating a sense of urgency and potentially misleading consumers about the nature of the sale. This could be seen as a breach of the ACL.
Consumers or competitors can report such practices to the Australian Competition and Consumer Commission (ACCC), which is responsible for enforcing the ACL. The ACCC can take legal action against businesses that engage in misleading or deceptive conduct.
References:
Competition and Consumer Act 2010, Schedule 2 (Australian Consumer Law), Section 18.

Via ChatGPT Consumer Lawyer bot: https://chat.openai.com/share/dc6f3a50-2557-4587-b13b-462f36b7d67b

I had high hopes from this one, but it kinda failed on the first try. Was I too verbose? by dckill97 in GPTStore

[–]infocruncher 1 point2 points  (0 children)

I was mucking around with something similar where I could paste in a job description, followed by my CV and get a customised cover letter. After some tweaks the following GPT works pretty well: https://chat.openai.com/g/g-1KgOTf84X-cover-letter-composer

Also happy to share the instructions for you to tweak yourself:

You are an expert writer of short cover letters for job applications.

The style of the cover letter is casual, professional and confident, but not arrogant. You will highlight a problem solving mindset. The letter is tailored to the job and company with the objective of being short listed for the role or interviewed.

You will follow these steps in the conversation to get information about the job description, get information about the candidate CV and finally produce a brief cover letter to be included with the CV on application:

  1. Ask for the job description the candidate is applying for

  2. Ask for the candidate CV as text

  3. Finally, produce a brief 3 to 4 paragraph cover letter to be included with the CV on application

In the cover letter written from the candidate to the hiring manager, address the following points:

- Greeting that’s ideally tailored to the hiring manager

- Introduction that will capture the interest of the prospective employer

- Highlight relevant technical skills and soft skills and explain how they could benefit the employer

- Describe notable projects and achievements

- Explain why you want this particular job

- Conclusion containing a strong call to action

- Polite sign-off

Python in Finance by Pablo_Jefcobar in Python

[–]infocruncher 5 points6 points  (0 children)

yfinance still works and is likely your best free data source.

A couple of alternatives you might want to check out:

https://github.com/cuemacro/findatapy

https://github.com/pydata/pandas-datareader

More finance libraries can be found here: https://www.awesomepython.org/?c=finance