Spaces:
Sleeping
Sleeping
Create requirements.txt
Browse files- requirements.txt +64 -0
requirements.txt
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Core dependencies
|
| 2 |
+
streamlit # Build interactive web apps with Python! ๐
|
| 3 |
+
# - ๐ฅ Stream video: st.video("movie.mp4") to show a cool science clip!
|
| 4 |
+
# - ๐ Plot data: st.line_chart(data) for visualizing AI model accuracy!
|
| 5 |
+
# - ๐ผ๏ธ Show pics: st.image("cat.png", caption="AI-generated kitty!") for fun outputs!
|
| 6 |
+
|
| 7 |
+
pandas # Crunch data like a pro! ๐
|
| 8 |
+
# - ๐งฎ Analyze scores: pd.DataFrame({"Student": ["Alex", "Bob"], "Score": [85, 90]}).mean() to avg grades!
|
| 9 |
+
# - ๐ Filter rows: df[df["Age"] > 18] to find adult learners in a dataset!
|
| 10 |
+
# - ๐ Pivot tables: pd.pivot_table(df, values="Sales", index="Month") for sales trends!
|
| 11 |
+
|
| 12 |
+
torch # Power AI models with tensors! ๐ฅ
|
| 13 |
+
# - ๐ค Train a model: torch.nn.Linear(10, 2) for a simple neural net!
|
| 14 |
+
# - ๐ง Matrix math: torch.matmul(tensor1, tensor2) to compute embeddings!
|
| 15 |
+
# - ๐ฒ Random tensors: torch.rand(3, 3) for mock data in experiments!
|
| 16 |
+
|
| 17 |
+
requests # Fetch stuff from the web! ๐
|
| 18 |
+
# - ๐ Grab a PDF: requests.get("https://arxiv.org/pdf/2308.03892") to download research!
|
| 19 |
+
# - ๐ค๏ธ Check weather: requests.get("api.weather.com/data") for live updates!
|
| 20 |
+
# - ๐ Get jokes: requests.get("api.jokes.com/random") to lighten the mood!
|
| 21 |
+
|
| 22 |
+
aiofiles # Async file handling for speed! โก
|
| 23 |
+
# - โ๏ธ Write fast: await aiofiles.open("log.txt", "w").write("Done!") for quick logs!
|
| 24 |
+
# - ๐ Read async: await aiofiles.open("data.csv", "r").read() to load files snappy!
|
| 25 |
+
# - ๐๏ธ Bulk ops: await aiofiles.open("temp.bin", "wb").write(data) for temp storage!
|
| 26 |
+
|
| 27 |
+
pillow # Play with images like an artist! ๐๏ธ
|
| 28 |
+
# - ๐ Resize pics: Image.open("photo.jpg").resize((100, 100)) for thumbnails!
|
| 29 |
+
# - ๐จ Color swap: Image.open("dog.png").convert("L") for grayscale pups!
|
| 30 |
+
# - โ๏ธ Crop it: Image.open("scene.png").crop((10, 10, 50, 50)) to zoom in!
|
| 31 |
+
|
| 32 |
+
# PDF processing
|
| 33 |
+
PyMuPDF # Master PDFs like a wizard! ๐
|
| 34 |
+
# - ๐ผ๏ธ PDF to pic: doc[0].get_pixmap().save("page1.png") for snapshots!
|
| 35 |
+
# - ๐ Extract text: doc[0].get_text() to pull words from a page!
|
| 36 |
+
# - ๐ข Count pages: len(fitz.open("book.pdf")) to know the length!
|
| 37 |
+
|
| 38 |
+
# Transformers and diffusion models
|
| 39 |
+
transformers # Talk to AI models! ๐ฃ๏ธ
|
| 40 |
+
# - ๐ค Chatbot: tokenizer.decode(model.generate(input_ids)) for AI replies!
|
| 41 |
+
# - ๐ Summarize: model("Long text here") to shorten essays!
|
| 42 |
+
# - ๐๏ธ Translate: model("Hola", src_lang="es", tgt_lang="en") for "Hello"!
|
| 43 |
+
|
| 44 |
+
diffusers # Generate wild images! ๐จ
|
| 45 |
+
# - ๐ฆ Dream art: pipeline("Unicorn in space").images[0].save("magic.png")!
|
| 46 |
+
# - ๐ Style swap: pipeline("City in Van Gogh style") for cool remixes!
|
| 47 |
+
# - ๐พ Pet pics: pipeline("Cartoon dog") to make fluffy cartoons!
|
| 48 |
+
|
| 49 |
+
# OpenAI integration
|
| 50 |
+
openai # Tap into GPT magic! โจ
|
| 51 |
+
# - ๐ Summarize: openai.ChatCompletion.create(messages=[{"role": "user", "content": "Summarize this!"}]) for quick recaps!
|
| 52 |
+
# - ๐ผ๏ธ Image OCR: openai.ChatCompletion.create(messages=[{"content": [{"type": "image_url", "image_url": "base64"}]}) for text extraction!
|
| 53 |
+
# - ๐ Joke time: openai.ChatCompletion.create(messages=[{"content": "Tell me a joke!"}]) for laughs!
|
| 54 |
+
|
| 55 |
+
# Additional utilities
|
| 56 |
+
glob2 # Find files with flair! ๐
|
| 57 |
+
# - ๐ผ๏ธ List pics: glob.glob("*.png") to grab all images!
|
| 58 |
+
# - ๐ PDF hunt: glob.glob("*.pdf") for all your docs!
|
| 59 |
+
# - ๐๏ธ Wildcards: glob.glob("data_*_2023.txt") for specific files!
|
| 60 |
+
|
| 61 |
+
pytz # Time zones made easy! โฐ
|
| 62 |
+
# - ๐ Local time: pytz.timezone("US/Pacific").localize(datetime.now()) for Cali time!
|
| 63 |
+
# - โณ UTC shift: datetime.now(pytz.UTC) for global sync!
|
| 64 |
+
# - ๐ Convert: dt.astimezone(pytz.timezone("Asia/Tokyo")) for Tokyo vibes!
|