'commit'
This commit is contained in:
@@ -42,7 +42,8 @@ class LibLibUtil:
|
|||||||
if response_data.get('code') == 0:
|
if response_data.get('code') == 0:
|
||||||
return response_data.get('data')
|
return response_data.get('data')
|
||||||
else:
|
else:
|
||||||
print(f"API错误: {response_data.get('message')}")
|
print(f"API错误: {response_data.get('msg')}")
|
||||||
|
#print(response_data)
|
||||||
return None
|
return None
|
||||||
except requests.exceptions.RequestException as e:
|
except requests.exceptions.RequestException as e:
|
||||||
print(f"请求异常: {str(e)}")
|
print(f"请求异常: {str(e)}")
|
||||||
@@ -64,6 +65,9 @@ class LibLibUtil:
|
|||||||
'commercialUse': model_info.get('commercialUse'),
|
'commercialUse': model_info.get('commercialUse'),
|
||||||
'modelUrl': model_info.get('modelUrl')
|
'modelUrl': model_info.get('modelUrl')
|
||||||
}
|
}
|
||||||
|
else:
|
||||||
|
print("获取模型版本信息失败")
|
||||||
|
print(model_info)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def generate_text_to_image(self, template_uuid, generate_params):
|
def generate_text_to_image(self, template_uuid, generate_params):
|
||||||
|
@@ -6,7 +6,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
# 测试获取模型版本信息
|
# 测试获取模型版本信息
|
||||||
print("===== 测试获取模型版本信息 =====")
|
print("===== 测试获取模型版本信息 =====")
|
||||||
version_uuid = "390e7df48aed45d4bc3f0bcbc89fa44c"
|
version_uuid = "6f7c4652458d4802969f8d089cf5b91f"
|
||||||
model_info = liblib.get_model_version_info(version_uuid)
|
model_info = liblib.get_model_version_info(version_uuid)
|
||||||
|
|
||||||
if model_info:
|
if model_info:
|
||||||
@@ -14,5 +14,3 @@ if __name__ == '__main__':
|
|||||||
print(f"版本名称:{model_info['versionName']}")
|
print(f"版本名称:{model_info['versionName']}")
|
||||||
print(f"是否允许商业用途:{model_info['commercialUse']}")
|
print(f"是否允许商业用途:{model_info['commercialUse']}")
|
||||||
print(f"模型下载地址:{model_info['modelUrl']}")
|
print(f"模型下载地址:{model_info['modelUrl']}")
|
||||||
else:
|
|
||||||
print("获取模型信息失败")
|
|
Binary file not shown.
Reference in New Issue
Block a user