bern icon indicating copy to clipboard operation
bern copied to clipboard

How to run and use from google colab ?

Open AmeerAlkhier opened this issue 3 years ago • 0 comments

Hello This is actually a question not an issue I have used the code you provided and edited it minimally so it will run on colab notebook. It seems to be working but the problem is that I don't know how to use the model in this case. can the server address be obtained via this command : !curl ipecho.net/plain

After I ran the previous command I got the server number and then I ran this script in a different notebook:

import requests
import json
body_data = {"param": json.dumps({"text": "CLAPO syndrome: identification of somatic activating PIK3CA mutations and the syndrome."})}
response = requests.post('http://<YOUR_SERVER_ADDRESS>:8888', data=body_data)
result_dict = response.json()

print(result_dict)

unfortunately it generates timeout error every time. I would really appreciate your help or any advice. Thanks.

here is the link to the notebook.

AmeerAlkhier avatar Sep 20 '21 12:09 AmeerAlkhier