commit
Browse files
app.py
CHANGED
@@ -2,16 +2,12 @@ import gradio as gr
|
|
2 |
import torch
|
3 |
import os
|
4 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
5 |
-
from huggingface_hub import spaces
|
6 |
|
7 |
# η°ε’ε€ζ°γγγγΌγ―γ³γεεΎ
|
8 |
HUGGINGFACE_TOKEN = os.getenv("HUGGINGFACE_TOKEN")
|
9 |
if not HUGGINGFACE_TOKEN:
|
10 |
raise ValueError("HUGGINGFACE_TOKEN environment variable is not set")
|
11 |
|
12 |
-
@spaces.GPU
|
13 |
-
def init():
|
14 |
-
pass
|
15 |
|
16 |
def _load_model():
|
17 |
if not torch.cuda.is_available():
|
|
|
2 |
import torch
|
3 |
import os
|
4 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
|
5 |
|
6 |
# η°ε’ε€ζ°γγγγΌγ―γ³γεεΎ
|
7 |
HUGGINGFACE_TOKEN = os.getenv("HUGGINGFACE_TOKEN")
|
8 |
if not HUGGINGFACE_TOKEN:
|
9 |
raise ValueError("HUGGINGFACE_TOKEN environment variable is not set")
|
10 |
|
|
|
|
|
|
|
11 |
|
12 |
def _load_model():
|
13 |
if not torch.cuda.is_available():
|