Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,9 @@ import os
|
|
| 3 |
from pprint import pprint
|
| 4 |
from mastodon import Mastodon #Mastodon.py
|
| 5 |
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
def client_log_in():
|
| 8 |
|
|
@@ -308,13 +311,13 @@ def update_target_website():
|
|
| 308 |
chatbot.value = chat_history
|
| 309 |
chatbot.update(value=chat_history)
|
| 310 |
|
| 311 |
-
twitter_auth_button.value =
|
| 312 |
get_target_website())
|
| 313 |
twitter_auth_button.update(
|
| 314 |
-
value=
|
| 315 |
get_target_website()))
|
| 316 |
|
| 317 |
-
return
|
| 318 |
get_target_website())
|
| 319 |
|
| 320 |
|
|
@@ -366,7 +369,7 @@ with block:
|
|
| 366 |
text_input = gr.Text(label="Input", visible=False).style()
|
| 367 |
text_output = gr.Text(label="Output", visible=False).style()
|
| 368 |
html_button = twitter_auth_button = gr.HTML(
|
| 369 |
-
value=
|
| 370 |
get_target_website())).style(
|
| 371 |
)
|
| 372 |
with gr.Row().style(equal_height=True):
|
|
|
|
| 3 |
from pprint import pprint
|
| 4 |
from mastodon import Mastodon #Mastodon.py
|
| 5 |
|
| 6 |
+
auth_button_text = '''<br><a href="{}"><button class="w3-button w3-light-grey w3-padding-large w3-section " onclick="document.getElementById('download').style.display='block'">
|
| 7 |
+
<i class=""></i> Login with Masterdon! 🐘
|
| 8 |
+
</button></a><br>'''
|
| 9 |
|
| 10 |
def client_log_in():
|
| 11 |
|
|
|
|
| 311 |
chatbot.value = chat_history
|
| 312 |
chatbot.update(value=chat_history)
|
| 313 |
|
| 314 |
+
twitter_auth_button.value = auth_button_text.format(
|
| 315 |
get_target_website())
|
| 316 |
twitter_auth_button.update(
|
| 317 |
+
value=auth_button_text.format(
|
| 318 |
get_target_website()))
|
| 319 |
|
| 320 |
+
return auth_button_text.format(
|
| 321 |
get_target_website())
|
| 322 |
|
| 323 |
|
|
|
|
| 369 |
text_input = gr.Text(label="Input", visible=False).style()
|
| 370 |
text_output = gr.Text(label="Output", visible=False).style()
|
| 371 |
html_button = twitter_auth_button = gr.HTML(
|
| 372 |
+
value=auth_button_text.format(
|
| 373 |
get_target_website())).style(
|
| 374 |
)
|
| 375 |
with gr.Row().style(equal_height=True):
|