Spaces:
Runtime error
Runtime error
Commit
·
a4920f4
1
Parent(s):
092e1e6
Update app.py
Browse files
app.py
CHANGED
|
@@ -109,15 +109,17 @@ def run_actr():
|
|
| 109 |
|
| 110 |
def run_ecs(inp):
|
| 111 |
result=ecf(inp)
|
| 112 |
-
db = sqlite3.connect(DB_FILE)
|
| 113 |
try:
|
|
|
|
|
|
|
| 114 |
#db.execute("SELECT * FROM reviews").fetchall()
|
| 115 |
#reviews = pd.DataFrame(reviews, columns=["id", "date_created", "name", "rate", "celsci"])
|
| 116 |
-
reviews, total_reviews = get_latest_reviews(db)
|
| 117 |
-
print(
|
| 118 |
except sqlite3.OperationalError:
|
| 119 |
print ("db error")
|
| 120 |
-
return (result
|
| 121 |
|
| 122 |
|
| 123 |
def load_data():
|
|
@@ -143,10 +145,11 @@ css="footer {visibility: hidden}"
|
|
| 143 |
with gr.Blocks() as demo:
|
| 144 |
with gr.Row():
|
| 145 |
with gr.Column():
|
| 146 |
-
result
|
| 147 |
-
|
|
|
|
| 148 |
styler = df.style.highlight_max(color = 'lightgreen', axis = 0)
|
| 149 |
-
print(result)
|
| 150 |
gr.Dataframe(styler)
|
| 151 |
#df1=run_ecs("Dan")
|
| 152 |
|
|
|
|
| 109 |
|
| 110 |
def run_ecs(inp):
|
| 111 |
result=ecf(inp)
|
| 112 |
+
#db = sqlite3.connect(DB_FILE)
|
| 113 |
try:
|
| 114 |
+
result=ecf(inp)
|
| 115 |
+
|
| 116 |
#db.execute("SELECT * FROM reviews").fetchall()
|
| 117 |
#reviews = pd.DataFrame(reviews, columns=["id", "date_created", "name", "rate", "celsci"])
|
| 118 |
+
#reviews, total_reviews = get_latest_reviews(db)
|
| 119 |
+
print(result)
|
| 120 |
except sqlite3.OperationalError:
|
| 121 |
print ("db error")
|
| 122 |
+
return (result)
|
| 123 |
|
| 124 |
|
| 125 |
def load_data():
|
|
|
|
| 145 |
with gr.Blocks() as demo:
|
| 146 |
with gr.Row():
|
| 147 |
with gr.Column():
|
| 148 |
+
result=run_ecs("Dan")
|
| 149 |
+
|
| 150 |
+
df=pd.DataFrame(result)
|
| 151 |
styler = df.style.highlight_max(color = 'lightgreen', axis = 0)
|
| 152 |
+
#print(result)
|
| 153 |
gr.Dataframe(styler)
|
| 154 |
#df1=run_ecs("Dan")
|
| 155 |
|