Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -46,14 +46,14 @@ def select(collection, document):
|
|
46 |
contents = ("The contents are: ", doc.to_dict())
|
47 |
return contents
|
48 |
|
49 |
-
def selectall(
|
50 |
-
docs = db.collection(
|
51 |
doclist=''
|
52 |
for doc in docs:
|
53 |
#docid=doc.id
|
54 |
#dict=doc.to_dict()
|
55 |
#doclist+=doc.to_dict()
|
56 |
-
r
|
57 |
return r
|
58 |
|
59 |
demo = gr.Blocks()
|
@@ -74,6 +74,6 @@ with demo:
|
|
74 |
b1.click(speech_to_text, inputs=audio_file, outputs=text)
|
75 |
b2.click(text_to_sentiment, inputs=text, outputs=label)
|
76 |
b3.click(upsert, inputs=text, outputs=saved)
|
77 |
-
b4.click(selectall, inputs=
|
78 |
|
79 |
demo.launch(share=True)
|
46 |
contents = ("The contents are: ", doc.to_dict())
|
47 |
return contents
|
48 |
|
49 |
+
def selectall(text):
|
50 |
+
docs = db.collection('Text2SpeechSentimentSave').stream()
|
51 |
doclist=''
|
52 |
for doc in docs:
|
53 |
#docid=doc.id
|
54 |
#dict=doc.to_dict()
|
55 |
#doclist+=doc.to_dict()
|
56 |
+
r+=(f'{doc.id} => {doc.to_dict()}')
|
57 |
return r
|
58 |
|
59 |
demo = gr.Blocks()
|
74 |
b1.click(speech_to_text, inputs=audio_file, outputs=text)
|
75 |
b2.click(text_to_sentiment, inputs=text, outputs=label)
|
76 |
b3.click(upsert, inputs=text, outputs=saved)
|
77 |
+
b4.click(selectall, inputs=text, outputs=savedAll)
|
78 |
|
79 |
demo.launch(share=True)
|