Yuvrajspd09 commited on
Commit
6b84ea4
·
verified ·
1 Parent(s): 958dfc6

Update vocca_ai/ai_response.py

Browse files
Files changed (1) hide show
  1. vocca_ai/ai_response.py +2 -2
vocca_ai/ai_response.py CHANGED
@@ -1,6 +1,6 @@
1
  from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
2
 
3
- # Load a high-quality summarization model
4
  model_name = "google/flan-t5-large"
5
  tokenizer = AutoTokenizer.from_pretrained(model_name)
6
  model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
@@ -15,7 +15,7 @@ def generate_call_summary(transcript):
15
 
16
  return tokenizer.decode(outputs[0], skip_special_tokens=True)
17
 
18
- # Example Usage
19
  if __name__ == "__main__":
20
  sample_text = "Patient: Hi, I need to schedule an appointment as soon as possible. I’ve been feeling really weak and dizzy for the past few days."
21
  print(f"Call Summary: {generate_call_summary(sample_text)}")
 
1
  from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
2
 
3
+
4
  model_name = "google/flan-t5-large"
5
  tokenizer = AutoTokenizer.from_pretrained(model_name)
6
  model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
 
15
 
16
  return tokenizer.decode(outputs[0], skip_special_tokens=True)
17
 
18
+
19
  if __name__ == "__main__":
20
  sample_text = "Patient: Hi, I need to schedule an appointment as soon as possible. I’ve been feeling really weak and dizzy for the past few days."
21
  print(f"Call Summary: {generate_call_summary(sample_text)}")