Spaces:
Runtime error
Runtime error
Commit
·
8673f28
1
Parent(s):
b6bb9e7
Update app.py
Browse files
app.py
CHANGED
@@ -157,7 +157,8 @@ def load_data2():
|
|
157 |
reviews2, total_reviews2 = get_latest_reviews2(db)
|
158 |
db.close()
|
159 |
return reviews2, total_reviews2
|
160 |
-
|
|
|
161 |
css="footer {visibility: hidden}"
|
162 |
# Applying style to highlight the maximum value in each row
|
163 |
#styler = df.style.highlight_max(color = 'lightgreen', axis = 0)
|
@@ -186,17 +187,15 @@ with gr.Blocks() as demo:
|
|
186 |
#return "Hello " + name + "!"
|
187 |
with gr.Row():
|
188 |
with gr.Column():
|
189 |
-
gr.
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
],
|
199 |
-
)
|
200 |
def backup_db():
|
201 |
shutil.copyfile(DB_FILE, "./reviews.db")
|
202 |
db = sqlite3.connect(DB_FILE)
|
|
|
157 |
reviews2, total_reviews2 = get_latest_reviews2(db)
|
158 |
db.close()
|
159 |
return reviews2, total_reviews2
|
160 |
+
def echo(message, history):
|
161 |
+
return message
|
162 |
css="footer {visibility: hidden}"
|
163 |
# Applying style to highlight the maximum value in each row
|
164 |
#styler = df.style.highlight_max(color = 'lightgreen', axis = 0)
|
|
|
187 |
#return "Hello " + name + "!"
|
188 |
with gr.Row():
|
189 |
with gr.Column():
|
190 |
+
potc = gr.ChatInterface(fn=echo, examples=["hello", "hola", "merhaba"], title="Echo Bot")
|
191 |
+
#name.change(inputs=name, outputs=celsci,_js="window.location.reload()")
|
192 |
+
#gr.Dataset(components=[gr.Textbox(visible=True)],
|
193 |
+
#label="Text Dataset",
|
194 |
+
#samples=[
|
195 |
+
# ["The quick brown fox jumps over the lazy dog"],
|
196 |
+
# ["Build & share delightful machine learning apps"]
|
197 |
+
#],
|
198 |
+
#)
|
|
|
|
|
199 |
def backup_db():
|
200 |
shutil.copyfile(DB_FILE, "./reviews.db")
|
201 |
db = sqlite3.connect(DB_FILE)
|