Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from bertopic import BERTopic
|
|
6 |
import pandas as pd
|
7 |
import gradio as gr
|
8 |
from bertopic.representation import KeyBERTInspired
|
9 |
-
|
10 |
|
11 |
logging.basicConfig(
|
12 |
level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
@@ -34,7 +34,7 @@ def get_docs_from_parquet(parquet_urls, column, offset, limit):
|
|
34 |
logging.debug(f"Dataframe: {df.head(5)}")
|
35 |
return df[column].tolist()
|
36 |
|
37 |
-
|
38 |
def generate_topics(dataset, config, split, column, nested_column):
|
39 |
logging.info(
|
40 |
f"Generating topics for {dataset} with config {config} {split} {column} {nested_column}"
|
|
|
6 |
import pandas as pd
|
7 |
import gradio as gr
|
8 |
from bertopic.representation import KeyBERTInspired
|
9 |
+
import spaces
|
10 |
|
11 |
logging.basicConfig(
|
12 |
level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
|
|
34 |
logging.debug(f"Dataframe: {df.head(5)}")
|
35 |
return df[column].tolist()
|
36 |
|
37 |
+
@spaces.GPU
|
38 |
def generate_topics(dataset, config, split, column, nested_column):
|
39 |
logging.info(
|
40 |
f"Generating topics for {dataset} with config {config} {split} {column} {nested_column}"
|