vakodiya commited on
Commit
4065212
1 Parent(s): 202867c

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -22,7 +22,7 @@ def preprocess_text(question: str):
22
  def classify_text(question: str):
23
  prompt_template = PromptTemplate(template="Answer the following question and classify it: {question}",
24
  input_variables=["question"])
25
- format_prompt = prompt_template.format(question=input_text)
26
  encoded_input = tokenizer(format_prompt, return_tensors='pt')
27
  # Run the model
28
  output = model.generate(**encoded_input) # Use generate method for text generation
 
22
  def classify_text(question: str):
23
  prompt_template = PromptTemplate(template="Answer the following question and classify it: {question}",
24
  input_variables=["question"])
25
+ format_prompt = prompt_template.format(question=question)
26
  encoded_input = tokenizer(format_prompt, return_tensors='pt')
27
  # Run the model
28
  output = model.generate(**encoded_input) # Use generate method for text generation