Spaces:
Runtime error
Runtime error
Update bin_public/app/local.py
Browse files21 unmodified lines22232425262728293031323321 unmodified lineschoice = random.sample(list, k=1)return choicedef get_file(choice):fs = HfFileSystem()with fs.open(f"spaces/{repo_id}/{choice}") as f:data = f.read().decode()return datadef info_context(file_list_m):context = f'已知信息{get_file(randomly(file_list_m))}根据已知信息,生成服从以下格式的患者信息,且尽量精简。\n皮肤病类型:\n患者性别:\n患者年龄:\n病史:\n大致症状:'return context21 unmodified lines22232425262728293031323321 unmodified lineschoice = random.sample(list, k=1)return choicedef get_file(choice, repo_id):fs = HfFileSystem()with fs.open(f"spaces/{repo_id}/{choice}") as f:data = f.read().decode()return datadef info_context(file_list_m, repo_id):context = f'已知信息{get_file(randomly(file_list_m), repo_id)}根据已知信息,生成服从以下格式的患者信息,且尽量精简。\n皮肤病类型:\n患者性别:\n患者年龄:\n病史:\n大致症状:'return context
bin_public/app/local.py+3-3