Chan-Y commited on
Commit
4519bd1
1 Parent(s): 5e995c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -14,9 +14,9 @@ llm = HuggingFaceEndpoint(
14
  )
15
  # Define the function to process user input
16
  def classify_text(text):
17
- prompt = "Classify the following text into a category or topic:"
18
- input_text = f"{prompt}\n{text}"
19
- results = llm.invoke(input_text)
20
  return results
21
 
22
  # Create Gradio interface
 
14
  )
15
  # Define the function to process user input
16
  def classify_text(text):
17
+ prompt = f"""Classify the following text into a category or topic. You dont need to write specific informations or explanations, only return the categories.
18
+ {text}\nCategories:"""
19
+ results = llm.invoke(prompt)
20
  return results
21
 
22
  # Create Gradio interface