Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,12 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
-
import os # Secrets에서 토큰을 가져오기 위한 라이브러리
|
| 4 |
-
|
| 5 |
-
# Secrets에서 HuggingFace 토큰 가져오기
|
| 6 |
-
HUGGINGFACE_TOKEN = os.getenv("HUGGINGFACE_TOKEN")
|
| 7 |
-
|
| 8 |
-
if not HUGGINGFACE_TOKEN:
|
| 9 |
-
raise ValueError("HUGGINGFACE_TOKEN 환경 변수에 유효한 토큰이 설정되어 있지 않습니다.")
|
| 10 |
|
| 11 |
# Cohere Command R+ 모델 ID 정의
|
| 12 |
COHERE_MODEL = "CohereForAI/c4ai-command-r-plus-08-2024"
|
|
@@ -54,6 +47,9 @@ def respond_cohere_qna(
|
|
| 54 |
# UI 설정
|
| 55 |
#############################
|
| 56 |
|
|
|
|
|
|
|
|
|
|
| 57 |
with gr.Blocks() as demo:
|
| 58 |
gr.Markdown("# 블로그 생성기")
|
| 59 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
# Cohere Command R+ 모델 ID 정의
|
| 5 |
COHERE_MODEL = "CohereForAI/c4ai-command-r-plus-08-2024"
|
|
|
|
| 47 |
# UI 설정
|
| 48 |
#############################
|
| 49 |
|
| 50 |
+
# HuggingFace 토큰을 변수에 저장
|
| 51 |
+
HUGGINGFACE_TOKEN = "YOUR_HUGGINGFACE_TOKEN"
|
| 52 |
+
|
| 53 |
with gr.Blocks() as demo:
|
| 54 |
gr.Markdown("# 블로그 생성기")
|
| 55 |
|