-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python packages such as fastapi added
- Loading branch information
Showing
8 changed files
with
134 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
# Use an official Python runtime as a base image | ||
FROM python:3.13-bookworm | ||
|
||
WORKDIR /app | ||
|
||
COPY . /app/ | ||
|
||
RUN pip install -r requirements.txt | ||
|
||
EXPOSE 8000 | ||
|
||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# yo-yo-maskr | ||
Reversible anonymisation service for us all | ||
A reversible anonymisation service for us all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from fastapi import FastAPI | ||
|
||
app = FastAPI() | ||
|
||
@app.get("/") | ||
async def read_root(): | ||
return {"message": "Hello, World!"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fastapi | ||
langchain-core | ||
langchain-ollama | ||
ollama | ||
rapidfuzz | ||
regex | ||
uvicorn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
fastapi | ||
ipykernel | ||
jupyter | ||
langchain-core | ||
langchain-ollama | ||
ollama | ||
rapidfuzz | ||
regex | ||
uvicorn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Hier ist ein kurzer Text mit vielen Namen von Personen und Orten: | ||
|
||
--- | ||
|
||
Es war ein kühler Herbstmorgen, als Marie Müller mit ihrem Bruder Thomas in Hamburg auf den Zug nach Berlin wartete. Dort wollten sie ihre Freunde Anna Schmidt und Lukas Hoffmann treffen, die gerade aus München zurückgekehrt waren. Während der Reise erzählte Marie von ihrem letzten Urlaub in Italien, wo sie in Rom einen alten Schulfreund namens Peter Lehmann getroffen hatte. Peter wohnte mittlerweile in der Nähe von Mailand und arbeitete für eine Firma in Venedig. | ||
|
||
In Berlin angekommen, holte sie ihr Onkel Karl Weber vom Bahnhof ab. Gemeinsam fuhren sie zu seiner Wohnung in der Friedrichstraße, wo sie später an einem Abendessen bei Familie Becker in Charlottenburg teilnehmen wollten. Dort kamen auch Karla Fischer, eine ehemalige Klassenkameradin, und Paul König, ein alter Freund aus der Schulzeit, hinzu. | ||
|
||
Am nächsten Tag machten sich Marie und Thomas auf den Weg nach Potsdam, um dort den berühmten Park Sanssouci zu besuchen. Unterwegs trafen sie auf einen Reiseleiter namens Andreas Schneider, der ihnen alles über die Geschichte der Stadt und den Park erzählte. Später besuchten sie noch den Kurfürstendamm in Berlin, wo sie zufällig auf Julia Wagner und ihren Bruder Frank trafen, die gerade von einem Ausflug nach Dresden zurückkehrten. | ||
|
||
Nach einer Woche voller Abenteuer kehrten sie zurück nach Hamburg, wo sie von ihrer Tante Sabine Schmidt und deren Nachbarn Klaus Neumann herzlich begrüßt wurden. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# yo-yo-maskr" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"\"LangChain is a popular open-source framework for building blockchain-based applications, particularly focused on the Ethereum ecosystem.\\n\\nTo understand what LangChain does, let's break it down:\\n\\n1. **Blockchain platform**: LangChain is built on top of Web3.js and utilizes the Ethereum blockchain as its foundation. This allows developers to create smart contracts and interact with blockchain data.\\n2. **Decentralized data storage**: LangChain provides a decentralized data storage solution using IPFS (InterPlanetary File System). This enables seamless data sharing, collaboration, and version control across multiple nodes on the network.\\n3. **Smart contract development**: The framework offers a set of tools and libraries for developing smart contracts, making it easier to create, deploy, and manage blockchain-based applications.\\n4. **Decentralized application (dApp) building**: LangChain is designed to help developers build dApps that can interact with the blockchain, enabling features like data storage, smart contract invocation, and decentralized governance.\\n\\nIn summary, LangChain is a comprehensive framework for building blockchain-based applications, providing tools and libraries for developing smart contracts, storing data in a decentralized manner, and creating decentralized applications on top of the Ethereum network.\"" | ||
] | ||
}, | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"from langchain_core.prompts import ChatPromptTemplate\n", | ||
"from langchain_ollama.llms import OllamaLLM\n", | ||
"\n", | ||
"template = \"\"\"Question: {question}\n", | ||
"\n", | ||
"Answer: Let's think step by step.\"\"\"\n", | ||
"\n", | ||
"prompt = ChatPromptTemplate.from_template(template)\n", | ||
"\n", | ||
"model = OllamaLLM(model=\"llama3.2\")\n", | ||
"\n", | ||
"chain = prompt | model\n", | ||
"\n", | ||
"chain.invoke({\"question\": \"What is LangChain?\"})" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"'Hier ist ein kurzer Text mit vielen Namen von Personen und Orten:\\n\\n---\\n\\nEs war ein kühler Herbstmorgen, als Marie Müller mit ihrem Bruder Thomas in Hamburg auf den Zug nach Berlin wartete. Dort wollten sie ihre Freunde Anna Schmidt und Lukas Hoffmann treffen, die gerade aus München zurückgekehrt waren. Während der Reise erzählte Marie von ihrem letzten Urlaub in Italien, wo sie in Rom einen alten Schulfreund namens Peter Lehmann getroffen hatte. Peter wohnte mittlerweile in der Nähe von Mailand und arbeitete für eine Firma in Venedig.\\n\\nIn Berlin angekommen, holte sie ihr Onkel Karl Weber vom Bahnhof ab. Gemeinsam fuhren sie zu seiner Wohnung in der Friedrichstraße, wo sie später an einem Abendessen bei Familie Becker in Charlottenburg teilnehmen wollten. Dort kamen auch Karla Fischer, eine ehemalige Klassenkameradin, und Paul König, ein alter Freund aus der Schulzeit, hinzu.\\n\\nAm nächsten Tag machten sich Marie und Thomas auf den Weg nach Potsdam, um dort den berühmten Park Sanssouci zu besuchen. Unterwegs trafen sie auf einen Reiseleiter namens Andreas Schneider, der ihnen alles über die Geschichte der Stadt und den Park erzählte. Später besuchten sie noch den Kurfürstendamm in Berlin, wo sie zufällig auf Julia Wagner und ihren Bruder Frank trafen, die gerade von einem Ausflug nach Dresden zurückkehrten.\\n\\nNach einer Woche voller Abenteuer kehrten sie zurück nach Hamburg, wo sie von ihrer Tante Sabine Schmidt und deren Nachbarn Klaus Neumann herzlich begrüßt wurden.'" | ||
] | ||
}, | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"with open('sample_text.txt', 'r') as file:\n", | ||
" sample_text = file.read()\n", | ||
"sample_text" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": ".venv", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.9" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = '0.1.0' |