fix: import from HuggingFace with random string is causing app crash (#2214)
This commit is contained in:
parent
b70e7fb917
commit
1bdf791360
@ -20,7 +20,9 @@ export const useGetHFRepoData = () => {
|
||||
const data = await res.json()
|
||||
setRepoData(data)
|
||||
} catch (err) {
|
||||
setFetchError(err as Error)
|
||||
setFetchError(
|
||||
Error("The repo does not exist or you don't have access to it.")
|
||||
)
|
||||
}
|
||||
setLoading(false)
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ export const HuggingFaceRepoDataLoadedModal = () => {
|
||||
? '❌ This model is not supported!'
|
||||
: '✅ This model is supported!'}
|
||||
</p>
|
||||
{repoData.tags.includes('gguf') ? (
|
||||
{repoData.tags?.includes('gguf') ? (
|
||||
<p>...But you can import it manually!</p>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
@ -18,7 +18,7 @@ export const HuggingFaceSearchErrorModal = () => {
|
||||
<p className="text-2xl font-bold">Error!</p>
|
||||
<p className="text-gray-500">Fetch error</p>
|
||||
</div>
|
||||
<p>{fetchError.message}</p>
|
||||
<p className="text-center">{fetchError.message}</p>
|
||||
<Button
|
||||
onClick={getRepoData}
|
||||
className="w-full"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user