Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,6 +27,7 @@ import json
|
|
27 |
from huggingface_hub import HfApi, login, upload_folder, create_repo
|
28 |
import os
|
29 |
from flask import Flask, jsonify, request
|
|
|
30 |
|
31 |
# Load configuration file
|
32 |
with open('config.json', 'r') as config_file:
|
@@ -319,7 +320,7 @@ if (should_train_model=='1'): #train model
|
|
319 |
)
|
320 |
|
321 |
url = "http://210.1.253.35:200/api/hello" # Example API
|
322 |
-
response =
|
323 |
|
324 |
if response.status_code == 200:
|
325 |
jsonify({"message": "Hello, World!"})
|
|
|
27 |
from huggingface_hub import HfApi, login, upload_folder, create_repo
|
28 |
import os
|
29 |
from flask import Flask, jsonify, request
|
30 |
+
import requests
|
31 |
|
32 |
# Load configuration file
|
33 |
with open('config.json', 'r') as config_file:
|
|
|
320 |
)
|
321 |
|
322 |
url = "http://210.1.253.35:200/api/hello" # Example API
|
323 |
+
response = requests.get(url, timeout=120)
|
324 |
|
325 |
if response.status_code == 200:
|
326 |
jsonify({"message": "Hello, World!"})
|