Spaces:
Runtime error
Runtime error
Commit
·
3e5edd3
1
Parent(s):
ead53bf
Update app.py
Browse files
app.py
CHANGED
|
@@ -87,14 +87,16 @@ def ccogsphere(name: str, rate: str, celsci: str):
|
|
| 87 |
db = sqlite3.connect(DB_FILE)
|
| 88 |
cursor = db.cursor()
|
| 89 |
#try:
|
| 90 |
-
|
| 91 |
-
celsci2=
|
|
|
|
| 92 |
if celsci=="Celscis List":
|
| 93 |
df = pd.DataFrame({
|
| 94 |
"Videos" : ["Video 1", "Video 2", "Video 3", "Video 4", "Video 5"],
|
| 95 |
"Views" : [500, 2000, 540, 300, 200],
|
| 96 |
"Duration" : [30, 20, 70, 35, 22]})
|
| 97 |
-
|
|
|
|
| 98 |
db.commit()
|
| 99 |
else:
|
| 100 |
celsci2=ecf(celsci2)
|
|
|
|
| 87 |
db = sqlite3.connect(DB_FILE)
|
| 88 |
cursor = db.cursor()
|
| 89 |
#try:
|
| 90 |
+
celsci2=celsci.split()
|
| 91 |
+
celsci2=celsci2[0] + "+" + celsci2[1]
|
| 92 |
+
|
| 93 |
if celsci=="Celscis List":
|
| 94 |
df = pd.DataFrame({
|
| 95 |
"Videos" : ["Video 1", "Video 2", "Video 3", "Video 4", "Video 5"],
|
| 96 |
"Views" : [500, 2000, 540, 300, 200],
|
| 97 |
"Duration" : [30, 20, 70, 35, 22]})
|
| 98 |
+
name=name.split()
|
| 99 |
+
cursor.execute("INSERT INTO reviews(name, view, duration) VALUES(?,?,?)", [name[0], "0" , name[1:]])
|
| 100 |
db.commit()
|
| 101 |
else:
|
| 102 |
celsci2=ecf(celsci2)
|