Chan-Y commited on
Commit
4a334db
·
verified ·
1 Parent(s): 82e707d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -18,11 +18,12 @@ def classify_text(text):
18
  {text}\nCategories of the text:"""
19
  results_dirty = llm.invoke(prompt)
20
 
21
- clean = """Your task is to read the following input and extract the classes/categories that is written in it. You never respond with other texts than the extracted classes.
22
  For example:
23
  input: cristiano ronaldo said he heard that the coach doesn't like him.
24
  output: gossip,football,coach,sports"""
25
- return results
 
26
 
27
  # Create Gradio interface
28
  interface = gr.Interface(
 
18
  {text}\nCategories of the text:"""
19
  results_dirty = llm.invoke(prompt)
20
 
21
+ clean_prompt = """Your task is to read the following input and extract the classes/categories that is written in it. You never respond with other texts than the extracted classes.
22
  For example:
23
  input: cristiano ronaldo said he heard that the coach doesn't like him.
24
  output: gossip,football,coach,sports"""
25
+ results_clean = llm.invoke(clean_prompt)
26
+ return results_clean
27
 
28
  # Create Gradio interface
29
  interface = gr.Interface(