Spaces:
Running
Running
Update app.py
Browse filescheck internet
app.py
CHANGED
@@ -4,6 +4,7 @@ import streamlit as st
|
|
4 |
import numpy as np
|
5 |
import base64
|
6 |
from io import BytesIO
|
|
|
7 |
from multilingual_clip import pt_multilingual_clip
|
8 |
from transformers import CLIPTokenizerFast, AutoTokenizer
|
9 |
import torch
|
@@ -39,7 +40,8 @@ def init_db():
|
|
39 |
client: Database connection object
|
40 |
"""
|
41 |
client = Client(url=st.secrets["DB_URL"], user=st.secrets["USER"], password=st.secrets["PASSWD"])
|
42 |
-
|
|
|
43 |
# We can check if the connection is alive
|
44 |
assert client.is_alive()
|
45 |
meta_field = {}
|
|
|
4 |
import numpy as np
|
5 |
import base64
|
6 |
from io import BytesIO
|
7 |
+
import requests
|
8 |
from multilingual_clip import pt_multilingual_clip
|
9 |
from transformers import CLIPTokenizerFast, AutoTokenizer
|
10 |
import torch
|
|
|
40 |
client: Database connection object
|
41 |
"""
|
42 |
client = Client(url=st.secrets["DB_URL"], user=st.secrets["USER"], password=st.secrets["PASSWD"])
|
43 |
+
resp = requests.get('https://www.google.com/')
|
44 |
+
assert resp.status_code == 200
|
45 |
# We can check if the connection is alive
|
46 |
assert client.is_alive()
|
47 |
meta_field = {}
|