sh0r.dev

닫기 검색결과 전체 보기
"Python" 검색결과 (2)
  • Python Pydantic에 대해서

    서론FastAPI를 사용하다보면 Pydantic을 이용해 커스텀 class를 정의해야 할 일이 생긴다.아래는 Pydantic의 BaseModel class를 상속한 CorrectionRequest class를 정의하는 모습이다.실제 맞춤법 검사기에서 사용하는 클래스이다.class CorrectionRequest(BaseModel): text: str correction: str memo: str recaptcha_response: str그러면 Pydantic은 무엇이고 왜 사용하는 걸까? 본론Pydantic의 공식 Docs의 서문을 인용하겠다.Pydantic is the most widely used data validation library for Python.Pydantic은 데..

    Python
    2024. 5. 13. 10:50
  • FastAPI에서 Huggingface Transformer API를 사용해보자

    서론맞춤법검사기를 제작하면서 Huggingface Transformer API(이하 Transfomer API)를 FastAPI 백엔드에서 사용할 일이 생겼다.처음에는 당연하게도 이런식으로 구성했다.@router.post("/correction", response_model=CorrectionResponse)@limiter.limit("60/seconds")async def correction(request: Request, correction: CorrectionRequest, user: Session = Depends(get_logged_user)): # 1. Tokenize and pad inputs in batches batch = [tokenizer([f"{tokenizer.bos_t..

    Python/FastAPI
    2024. 5. 7. 15:49
이전페이지
더 보기
다음페이지
블로그 이미지

프로그래밍을 하며 생기는 에러나 트러블슈팅에 대한 내용들입니다.

by dalbodeule

공지사항

    최근...

  • 포스트
  • 댓글
  • 더 보기

태그

  • cloudflare worker
  • nuxtjs3
  • 무결성 검증
  • cloudflare turnstile
  • pydantic
  • 네이밍 컨벤션
  • asyncio
  • play integrity service
  • integrity
  • cloudflare d1
  • recaptcha token
  • FastAPI
  • ios appattest
  • runtimeconfig
  • nuxtjs
  • python pydantic
  • recaptcha 검증
  • drf
  • nuxthub
  • oracle m1 mac
  • Attest
  • Python
  • slugrelatedgetorcreatefield
  • long job
  • nuxt recaptcha
  • recaptcha
  • nuxt3
  • colima
  • slugrelatedfield
  • SpringBoot

글 보관함

«   2025/06   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

링크

카테고리

분류 전체보기 (18)
TypeScript (8)
Vuejs (5)
React (1)
Python (4)
Django (1)
FastAPI (2)
Java Kotlin (3)
Spring SpringBoot (3)
기타 기술스택 (3)
Docker (1)

카운터

Total
Today
Yesterday
  • 홈
  • 태그
  • 방명록
dalbodeule's Blog is powered by daumkakao
Skin info material T Mark 5+ by 뭐하라
favicon

sh0r.dev

프로그래밍을 하며 생기는 에러나 트러블슈팅에 대한 내용들입니다.

  • 홈
  • 태그
  • 방명록

관리자 메뉴

  • 관리자 모드
  • 글쓰기
  • 분류 전체보기 (18)
    • TypeScript (8)
      • Vuejs (5)
      • React (1)
    • Python (4)
      • Django (1)
      • FastAPI (2)
    • Java Kotlin (3)
      • Spring SpringBoot (3)
    • 기타 기술스택 (3)
      • Docker (1)

카테고리

PC화면 보기 티스토리 Daum

티스토리툴바