Instructions to use ProTema/first-start with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- BERTopic
How to use ProTema/first-start with BERTopic:
from bertopic import BERTopic model = BERTopic.load("ProTema/first-start") - Notebooks
- Google Colab
- Kaggle
Download src/widgets/Post/ui/PostList/PostList.tsx from ProTema/first-start: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/ProTema/first-start/resolve/main/src/widgets/Post/ui/PostList/PostList.tsx
- Command line
-
hf download hf://ProTema/first-start/src/widgets/Post/ui/PostList/PostList.tsx
-
curl -L -o PostList.tsx https://huggingface.co/ProTema/first-start/resolve/main/src/widgets/Post/ui/PostList/PostList.tsx
1.02 kB
| import { DeletePost, EditPost } from '@/features/Post'; | |
| import { PostCard, useFetchPosts } from '@/entities/Post'; | |
| import { classNames } from '@/shared/lib/classNames/classNames'; | |
| import cls from './PostList.module.scss'; | |
| interface PostListProps { | |
| className?: string; | |
| } | |
| export const PostList = (props: PostListProps) => { | |
| const { className } = props; | |
| const { data, isPending, isError } = useFetchPosts(); | |
| if (isPending) { | |
| return <div>...Идет загрузка</div>; | |
| } | |
| if (isError) { | |
| return <div>Произошла непредвиденная ошибка</div>; | |
| } | |
| return ( | |
| <div className={classNames(cls.PostList, {}, [className])}> | |
| {data?.map((post) => ( | |
| <PostCard | |
| key={post.id} | |
| post={post} | |
| editButton={<EditPost postId={post.id} />} | |
| deleteButton={<DeletePost postId={post.id} />} | |
| /> | |
| ))} | |
| </div> | |
| ); | |
| }; | |