Spaces:
Running
Running
Commit
·
cd93ca1
1
Parent(s):
b6fbd69
chore: Add login functionality and update requirements.txt
Browse files
app.py
CHANGED
@@ -13,7 +13,9 @@ from huggingface_hub import CommitScheduler, hf_hub_download, login
|
|
13 |
|
14 |
from prompts import detailed_genre_description_prompt, basic_prompt
|
15 |
import random
|
|
|
16 |
|
|
|
17 |
# TODOs
|
18 |
# 1. Add a login button
|
19 |
# 2. Prompt library expand
|
@@ -71,6 +73,7 @@ with gr.Blocks(theme=tufte_theme) as demo:
|
|
71 |
Would you read a book based on this LLM generated blurb? <br> Your vote will be added to <a href="https://example.com">this</a> Hugging Face dataset</p>"""
|
72 |
+ """"""
|
73 |
)
|
|
|
74 |
# user_name = gr.Textbox(label="User Name", placeholder="Enter your name")
|
75 |
with gr.Row():
|
76 |
generate_btn = gr.Button("Create a book", variant="primary")
|
|
|
13 |
|
14 |
from prompts import detailed_genre_description_prompt, basic_prompt
|
15 |
import random
|
16 |
+
from huggingface_hub import login, get_token
|
17 |
|
18 |
+
login(get_token())
|
19 |
# TODOs
|
20 |
# 1. Add a login button
|
21 |
# 2. Prompt library expand
|
|
|
73 |
Would you read a book based on this LLM generated blurb? <br> Your vote will be added to <a href="https://example.com">this</a> Hugging Face dataset</p>"""
|
74 |
+ """"""
|
75 |
)
|
76 |
+
gr.LoginButton(size="sm")
|
77 |
# user_name = gr.Textbox(label="User Name", placeholder="Enter your name")
|
78 |
with gr.Row():
|
79 |
generate_btn = gr.Button("Create a book", variant="primary")
|