Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
from huggingface_hub import InferenceClient
|
3 |
import random
|
4 |
|
5 |
-
#
|
6 |
-
|
|
|
7 |
|
8 |
# Story genres with genre-specific example prompts
|
9 |
GENRE_EXAMPLES = {
|
|
|
1 |
import gradio as gr
|
2 |
+
import os
|
3 |
from huggingface_hub import InferenceClient
|
4 |
import random
|
5 |
|
6 |
+
# Get token from environment variable
|
7 |
+
hf_token = os.environ.get("HF_TOKEN")
|
8 |
+
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta", token=hf_token)
|
9 |
|
10 |
# Story genres with genre-specific example prompts
|
11 |
GENRE_EXAMPLES = {
|