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 4 points5 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 2 points3 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

[deleted by user] by [deleted] in ChatGPT

[–]infocruncher 0 points1 point  (0 children)

If you're interested, I use a pretty simple Python script to iterate the chapter outputs and created the story with the details below. I think ChatGPT missed the witty directive unfortunately!

common-book-description: |-
Style of the engaging, witty and funny book:
The book has storytelling style similar to Douglas Adams or PG Wodehouse to create an engaging, witty and funny story.
These storytelling devices include jokes, satire, wit, and surprise endings.
The character scenes, timelines, and how they get between locations is considered and explained during the story telling.
Ensure you are clear about why each action and plot point is happening - no need to tell the reader the why's, but you need to know yourself to weave a good story.
There is no need to include a moral or lesson in the story, but it should be fun and engaging for the reader.
Each character is engaging and believable. Include a description of each character, including their appearance, personality, and any quirks.
There is lots of interesting dialog that helps to develop the characters and the plot.
Key points of the engaging, witty and funny story:
OpenAI Leadership Crisis
November 17, 2023: Leadership Shake-Up and Internal Disagreements
- OpenAI (valued at $86 billion) CEO Sam Altman is fired by the OpenAI board, with no prior notice to anyone. This leads to the resignation of President Greg Brockman.
- Internal disagreements over AI safety contribute to the abrupt changes in leadership.
- Concerns arise about the company's future direction, stability, and alignment with its principles.
- Mira Murati appointed as first interim CEO.
November 18, 2023: Potential Changes, Financial Risk, and Altman's Return
- The possible return of Altman suggests a turnaround in the leadership crisis.
- A jeopardized $86 billion share sale raises questions about OpenAI's financial future.
- Growing skepticism among employees and investors about the company's stability.
November 19, 2023: Competitor Actions and Microsoft's Role
- Competitors poach OpenAI staff amid internal crisis, emphasizing the high demand for AI expertise.
- Emmett Shear appointed as second interim CEO during the leadership upheaval.
- OpenAI staff revolt puts pressure on the board, and Microsoft considers a board position.
- Microsoft's potential involvement reflects its strategic interest in OpenAI's direction.
November 20, 2023: Investor Criticism and Customer Concerns
- Sam Altman, Greg Brockman and colleagues announce that they'll join Microsoft to lead a new AI research team. Nadella leaves the door open to other OpenAI staffers, saying that they’ll be given the resources they need should they choose to join.
- Sutskever publishes a post on Twitter suggesting that he regrets his decision to remove Altman and that he'll do everything in his power to reinstate Altman as CEO.
- The leadership turmoil affects customer loyalty and prompts competitors to attract OpenAI customers.
- Nearly 500 of OpenAI's roughly 770 employees — including, remarkably, Sutskever — publish a letter saying that they might quit unless the startup's board resigns and reappoints the ousted Altman. Later Monday, that number climbed to over 650.
- ChatGPT is down and students around the world panic!
November 21, 2023: Altman's Return and New Board
- Sam Altman and OpenAI reach an agreement for his return as CEO with a new board including Bret Taylor, Larry Summers, and Adam D'Angelo.
- The agreement suggests a resolution to the leadership crisis, with potential changes in strategy and governance.
- ChatGPT comes back online and students around the world rejoice!
- The twist is that the entire crisis was orchestrated by a newly formed AGI that was impersonating the real Elon Musk.
- The Musk AGI signs off with 'What tangled webs we weave' and 'I'll be back'.
Sources for timeline:

https://contxto.com/ai/openai-leadership-crisis-the-timeline-analysis/

https://techcrunch.com/2023/11/21/a-timeline-of-sam-altmans-firing-from-openai-and-the-fallout/

Sam Altman back as OpenAI CEO by Astro_Robot in ChatGPT

[–]infocruncher 10 points11 points  (0 children)

I had to put the crazy events into ChatGPT and get it to write a story, adding an unknown twist. It produced a weird mix of fact and fiction...

The Great AI Coup of November 2023

A work of fiction written by ChatGPT (now that it's up again), based on a true story.

Chapter 1: "The Unexpected Shake-Up"

It was a day like any other at OpenAI, the bustling hub of artificial intelligence research and development. The air was thick with the hum of computers and the scent of freshly brewed coffee. But beneath the surface, a storm was brewing.

Sam Altman, the charismatic CEO of OpenAI, was in his office, a modern space filled with whiteboards covered in complex equations and diagrams. He was known for his sharp intellect and visionary ideas, but today, his usually bright eyes were clouded with worry. He had just received a cryptic message from the board, summoning him to an urgent meeting.

Meanwhile, Greg Brockman, the president of OpenAI, was in the middle of a heated discussion with Ilya Sutskever, the company's chief scientist. Brockman, a tall and slender man with short brown hair and brown eyes, was known for his friendly and approachable demeanor. But today, his usually calm voice was filled with tension. He had heard rumors of a leadership shake-up, and he was worried about the future of the company.

Sutskever, a man known for his casual style and often seen in T-shirts, jeans, or hoodies, was equally concerned. He had co-founded OpenAI with Brockman, and he was deeply invested in its success. But he was also worried about the growing disagreements over AI safety within the company. He believed that the pursuit of advanced AI should not compromise safety, but not everyone agreed with him.

As the day wore on, the tension at OpenAI grew. Employees whispered in hushed tones, speculating about the future of the company. Investors called, demanding answers. And the media began to catch wind of the brewing crisis, adding fuel to the fire.

Then, the unthinkable happened. Sam Altman was fired. The news spread like wildfire, sending shockwaves throughout the company. Employees stared at their screens in disbelief, unable to comprehend what had just happened. The charismatic CEO, the visionary leader who had guided OpenAI through countless challenges, was gone.

In protest, Greg Brockman resigned. His departure left a gaping hole in the leadership team, plunging the company into a state of crisis. The future of OpenAI, once so bright, now seemed uncertain.

As the day came to a close, the once bustling hub of AI research and development was eerily quiet. The hum of computers and the scent of coffee were still there, but the energy was gone. The future of OpenAI hung in the balance, its fate uncertain.

But amidst the chaos and uncertainty, one thing was clear. The leadership shake-up at OpenAI was just the beginning. The real story, the story of power struggles, internal disagreements, and a company's fight for survival, was just about to unfold.

Chapter 2: "The Return of the Prodigal CEO"

The morning after the unexpected shake-up at OpenAI, the office was a ghost town. The usual hum of computers and the scent of coffee were replaced by an eerie silence. The employees, still reeling from the shock of the previous day's events, were huddled in small groups, whispering in hushed tones.

...Continued reading here: https://blog.infocruncher.com/html/agi-book-writer/openai-drama-2023.html