Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 702 Bytes
b594e33 c1f12bf b594e33 c1f12bf b594e33 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import { expect, test } from 'vitest'
import { parseHuggingFaceHubId } from './parseHuggingFaceHubId'
test('parseHuggingFaceHubId', () => {
expect(parseHuggingFaceHubId('stabilityai/stable-cascade')).toStrictEqual({
category: 'models',
categoryAndOwnerAndId: 'models/stabilityai/stable-cascade',
id: 'stable-cascade',
owner: 'stabilityai',
ownerAndId: 'stabilityai/stable-cascade',
})
expect(
parseHuggingFaceHubId('spaces/jbilcke-hf/ai-comic-factory')
).toStrictEqual({
category: 'spaces',
categoryAndOwnerAndId: 'spaces/jbilcke-hf/ai-comic-factory',
id: 'ai-comic-factory',
owner: 'jbilcke-hf',
ownerAndId: 'jbilcke-hf/ai-comic-factory',
})
})
|