Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
# requirements.txt | |
streamlit # Core web app - st.write("Hello"), st.button("Click"), st.selectbox("Choose", opts) | |
Pillow # Image tools - Image.open("pic.jpg"), img.resize((100,100)), img.save("out.png") | |
plotly # Plots - px.scatter(df, x="a", y="b"), px.line(df), fig.show() | |
opencv-python # Vision - cv2.imread("img.jpg"), cv2.resize(img, (w,h)), cv2.imwrite("out.jpg", img) | |
moviepy # Video - VideoFileClip("vid.mp4"), clip.resize(0.5), clip.write_videofile("out.mp4") | |
python-dotenv # Env vars - load_dotenv(), os.getenv("KEY"), dotenv_values() | |
pytz # Time - timezone('US/Pacific'), dt.astimezone(tz), utc.localize(dt) | |
requests # HTTP - requests.get(url), r.json(), r.raise_for_status() | |
openai # AI API - client.chat.complete(), client.images.create(), client.audio.transcribe() | |
beautifulsoup4 # HTML - BeautifulSoup(html), soup.find("div"), soup.find_all("p") | |
PyPDF2 # PDF - PdfReader("doc.pdf"), reader.pages[0].extract_text(), writer.write(f) | |
textract # Extract - process("doc.pdf"), process("doc.docx"), process("text.txt") | |
gradio-client # Gradio - client.predict(text), interface.launch(), client.submit(inputs) | |
huggingface-hub # Models - from_pretrained("model"), list_models(), push_to_hub() | |
audio-recorder-streamlit # Audio - audio_recorder(), get_audio_data(), save_recording() | |
xmltodict # XML - parse(xml_str), unparse(dict_obj), parse(f.read()) | |
mistune # Markdown - markdown(text), escape(html), renderer.render(tokens) | |
python-docx # Word - Document(), doc.add_paragraph(), doc.save("out.docx") | |
faiss-cpu # Vectors - IndexFlatL2(d), index.add(vecs), D,I = index.search(q,k) | |
scikit-learn # ML - fit(X,y), predict(X), train_test_split(X,y) | |
langchain # LLM - load_chain(), chain.run(input), memory.save_context() | |
tiktoken # Tokens - encode(text), decode(tokens), num_tokens = len(tokens) | |
anthropic # Claude - client.messages.create(), client.complete() | |
edge-tts # TTS - communicate.run(text), save_to_file(), stream_to_speaker() | |
streamlit-marquee # Scroll - streamlit_marquee(text), set_speed(), set_style() | |
extra-streamlit-components>=0.1.60 # Import stx; cookie_mgr=stx.CookieManager(); cookie_mgr.get() |