Spaces:
Running
on
Zero
Running
on
Zero
AndyC
commited on
Commit
·
58dfb53
1
Parent(s):
13b82ac
added login
Browse files
app.py
CHANGED
@@ -1,11 +1,15 @@
|
|
1 |
import torch
|
|
|
2 |
from collections.abc import Iterator
|
3 |
from transformers import Gemma3ForCausalLM, AutoTokenizer, TextIteratorStreamer
|
4 |
import time
|
5 |
import spaces
|
6 |
from threading import Thread
|
7 |
import gradio as gr
|
|
|
8 |
|
|
|
|
|
9 |
MAX_MAX_NEW_TOKENS = 2048
|
10 |
DEFAULT_MAX_NEW_TOKENS = 1024
|
11 |
MAX_INPUT_TOKEN_LENGTH = 4096
|
|
|
1 |
import torch
|
2 |
+
from huggingface_hub import login
|
3 |
from collections.abc import Iterator
|
4 |
from transformers import Gemma3ForCausalLM, AutoTokenizer, TextIteratorStreamer
|
5 |
import time
|
6 |
import spaces
|
7 |
from threading import Thread
|
8 |
import gradio as gr
|
9 |
+
import os
|
10 |
|
11 |
+
TOKEN = os.getenv("TOKEN")
|
12 |
+
login(token=TOKEN)
|
13 |
MAX_MAX_NEW_TOKENS = 2048
|
14 |
DEFAULT_MAX_NEW_TOKENS = 1024
|
15 |
MAX_INPUT_TOKEN_LENGTH = 4096
|