Spaces:
Running
Running
Commit
·
0537fbe
1
Parent(s):
37a83d8
fix
Browse files
app.py
CHANGED
@@ -105,7 +105,11 @@ def generate_vote_id(user_id, blurb):
|
|
105 |
|
106 |
|
107 |
def log_blurb_and_vote(
|
108 |
-
prompt,
|
|
|
|
|
|
|
|
|
109 |
):
|
110 |
user_id = user_info.username if user_info is not None else str(uuid.uuid4())
|
111 |
vote_id = generate_vote_id(user_id, blurb)
|
@@ -183,8 +187,8 @@ with gr.Blocks(theme=tufte_theme) as demo:
|
|
183 |
prompt_state,
|
184 |
blurb_output,
|
185 |
gr.Textbox(value="upvote", visible=False),
|
186 |
-
user_state,
|
187 |
model_state,
|
|
|
188 |
],
|
189 |
outputs=[vote_output, voting_row],
|
190 |
)
|
@@ -194,8 +198,8 @@ with gr.Blocks(theme=tufte_theme) as demo:
|
|
194 |
prompt_state,
|
195 |
blurb_output,
|
196 |
gr.Textbox(value="downvote", visible=False),
|
197 |
-
user_state,
|
198 |
model_state,
|
|
|
199 |
],
|
200 |
outputs=[vote_output, voting_row],
|
201 |
)
|
|
|
105 |
|
106 |
|
107 |
def log_blurb_and_vote(
|
108 |
+
prompt,
|
109 |
+
blurb,
|
110 |
+
vote,
|
111 |
+
model_id,
|
112 |
+
user_info: gr.OAuthProfile | None,
|
113 |
):
|
114 |
user_id = user_info.username if user_info is not None else str(uuid.uuid4())
|
115 |
vote_id = generate_vote_id(user_id, blurb)
|
|
|
187 |
prompt_state,
|
188 |
blurb_output,
|
189 |
gr.Textbox(value="upvote", visible=False),
|
|
|
190 |
model_state,
|
191 |
+
user_state,
|
192 |
],
|
193 |
outputs=[vote_output, voting_row],
|
194 |
)
|
|
|
198 |
prompt_state,
|
199 |
blurb_output,
|
200 |
gr.Textbox(value="downvote", visible=False),
|
|
|
201 |
model_state,
|
202 |
+
user_state,
|
203 |
],
|
204 |
outputs=[vote_output, voting_row],
|
205 |
)
|