JustKiddo commited on
Commit
f6d2ab7
·
verified ·
1 Parent(s): e46bafe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -11
app.py CHANGED
@@ -1,24 +1,17 @@
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
  from bertopic import BERTopic
4
- from sklearn.datasets import fetch_20newsgroups
5
  from datasets import load_dataset
6
 
7
- #docs = fetch_20newsgroups(subset='all')['data']
8
- #topic_model = BERTopic()
9
- #topics, probabilities = topic_model.fit_transform(docs)
10
-
11
-
12
-
13
  """
14
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
15
  """
16
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
17
- topic_model = BERTopic.load("MaartenGr/BERTopic_Wikipedia")
18
  # Train model
19
- #topic_model = BERTopic().fit("JustKiddo/KiddosVault")
20
-
21
- #dataset = load_dataset("JustKiddo/KiddosVault")
22
 
23
  def respond(
24
  message,
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
  from bertopic import BERTopic
 
4
  from datasets import load_dataset
5
 
 
 
 
 
 
 
6
  """
7
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
8
  """
9
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
10
+ #topic_model = BERTopic.load("MaartenGr/BERTopic_Wikipedia")
11
  # Train model
12
+ #topic_model = BERTopic("english")
13
+ #topics, probs = topic_model.fit_transform(docs)
14
+ dataset = load_dataset("JustKiddo/KiddosVault")
15
 
16
  def respond(
17
  message,