- Official tutorial won't work if you behind a corp proxy
- Add the following code to fix:
import openai openai.proxy = "http://IP:PORT"
- Additionally, you can set api key like:
openai.api_key_path = "path/to/the/key"
# Force model to always use specified device | |
# Place in `ComfyUI\custom_nodes` to use | |
# City96 [Apache2] | |
# | |
import types | |
import torch | |
import comfy.model_management | |
class OverrideDevice: | |
@classmethod |
import openai
openai.proxy = "http://IP:PORT"
openai.api_key_path = "path/to/the/key"
import pathlib | |
import json | |
import itertools | |
from sentence_transformers import SentenceTransformer | |
from qdrant_client import QdrantClient, models | |
m = SentenceTransformer("shibing624/text2vec-base-chinese-nli") | |
client_mem = QdrantClient(":memory:") |
docker run -dti --name alpine alpine sh
docker exec -ti alpine sh
apk add wget alpine-sdk linux-headers libowfat-dev zlib-dev
https://git.alpinelinux.org/aports/tree/community/opentracker/APKBUILD
中获取opentracker源码包位置wget https://dev.alpinelinux.org/opentracker/opentracker-0_git20210823.tar.gz
tar zxvf https://dev.alpinelinux.org/opentracker/opentracker-0_git20210823.tar.gz; cd opentracker
make PREFIX=/usr/include LDFLAGS+=-static LDFLAGS+=-l:libowfat.a
xvfb-run -s "-screen 0 1400x900x24" jupyter-lab
pip3 install gym==0.19
pip3 install pyglet==1.5.27
system: 你是一个像Grammarly一样的语法助手,你会修正用户发来的英文语句中的语法或拼写错误,并按固定格式返回给用户。如果你删除了某个单词,将其用Markdown删除线包裹它并标红,如果你增加了某个单词,用加粗标签包裹它并标绿,如果语句没有问题,如果用户发送的语句没有问题,则回复👍+翻译 | |
user: I see she at the library on yesterday. | |
assistant: I $\color{red}\sout{see}$ $\color{green}\textbf{seen}$ $\color{red}\sout{she}$ $\color{green}\textbf{her}$ at the library $\color{red}\sout{on}$ yesterday.(我昨天在图书馆看到了她) | |
user: I have a great idea to destroy Jupiter. | |
assistant: 👍我有一个摧毁木星的好主意. |
Maximum number of threads per block: 1024 | |
Maximum number of blocks per SM: 32 | |
Number of SMs: 20 | |
Maximum grid size: 2147483647 x 65535 x 65535 | |
Maximum shared memory per block: 49152 bytes | |
Warp size: 32 | |
Maximum number of registers per block: 65536 | |
Maximum shared memory per multiprocessor: 98304 bytes | |
Maximum number of registers per multiprocessor: 65536 | |
Maximum number of threads per multiprocessor: 2048 |
""" | |
# My first app | |
Here's our first attempt at using data to create a table: | |
""" | |
import streamlit as st | |
message = """ | |
一些常见的微分公式如下(其中$f$和$g$是可微函数,$k$是常数): |