Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ questions = [
|
|
| 20 |
"How old is the child?",
|
| 21 |
"What is the gender?",
|
| 22 |
"Can you provide the name and location of the child's school?",
|
| 23 |
-
"What are the names of the child's guardians or
|
| 24 |
"What is the chief complaint regarding the child's oral health? If there is none, just say the word 'none', else elaborate only on medication history",
|
| 25 |
"Can you provide any relevant medical history for the child? If there is none, just say the word 'none', else elaborate",
|
| 26 |
"Does the child take any medications regularly? If there is none, just say the word 'none'. If yes, please specify.",
|
|
@@ -142,7 +142,7 @@ def save_answers(*args):
|
|
| 142 |
# Function to download table as CSV
|
| 143 |
def download_table_to_csv():
|
| 144 |
# Fetch data from Supabase table
|
| 145 |
-
response = supabase.table(
|
| 146 |
|
| 147 |
# Check if data is available
|
| 148 |
if not response.data:
|
|
@@ -168,7 +168,7 @@ def download_table_to_csv():
|
|
| 168 |
writer = csv.writer(f)
|
| 169 |
writer.writerows(csv_data)
|
| 170 |
|
| 171 |
-
print(f"Downloaded table '{
|
| 172 |
return csv_file
|
| 173 |
|
| 174 |
def gradio_download():
|
|
|
|
| 20 |
"How old is the child?",
|
| 21 |
"What is the gender?",
|
| 22 |
"Can you provide the name and location of the child's school?",
|
| 23 |
+
"What are the names of the child's guardians or paretnts?",
|
| 24 |
"What is the chief complaint regarding the child's oral health? If there is none, just say the word 'none', else elaborate only on medication history",
|
| 25 |
"Can you provide any relevant medical history for the child? If there is none, just say the word 'none', else elaborate",
|
| 26 |
"Does the child take any medications regularly? If there is none, just say the word 'none'. If yes, please specify.",
|
|
|
|
| 142 |
# Function to download table as CSV
|
| 143 |
def download_table_to_csv():
|
| 144 |
# Fetch data from Supabase table
|
| 145 |
+
response = supabase.table(oral_health_assessments).select("*").execute()
|
| 146 |
|
| 147 |
# Check if data is available
|
| 148 |
if not response.data:
|
|
|
|
| 168 |
writer = csv.writer(f)
|
| 169 |
writer.writerows(csv_data)
|
| 170 |
|
| 171 |
+
print(f"Downloaded table '{oral_health_assessments}' to '{csv_file}'")
|
| 172 |
return csv_file
|
| 173 |
|
| 174 |
def gradio_download():
|