Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
namgyu-youn
/
topicgen
like
1
Running
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
cb1546b
topicgen
/
scripts
/
utils.py
namgyu-youn
Upload 7 files
545ce24
verified
4 months ago
raw
Copy download link
history
blame
Safe
201 Bytes
from
typing
import
List
,
Dict
def
format_topics
(
topics:
List
[
str
]
) ->
List
[
str
]:
return
[
f"#
{topic.lower()}
"
for
topic
in
topics]
def
clean_text
(
text:
str
) ->
str
:
return
text.strip().lower()