Turbiling commited on
Commit
cd9d24c
·
verified ·
1 Parent(s): 9ebc2ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -6
app.py CHANGED
@@ -53,12 +53,18 @@ Include the following structured components only:
53
  """
54
 
55
  urdu_response = hf_client.text_generation(
56
- model="MuhammadYaseen77999/urdu-islamic-bot",
57
- inputs=prompt,
58
- max_new_tokens=500,
59
- temperature=0.7,
60
- )
61
- lesson_text = urdu_response.strip()
 
 
 
 
 
 
62
 
63
  # Create Word document
64
  doc = Document()
 
53
  """
54
 
55
  urdu_response = hf_client.text_generation(
56
+ model="MuhammadYaseen77999/urdu-islamic-bot",
57
+ prompt=prompt,
58
+ max_new_tokens=600,
59
+ temperature=0.7,
60
+ )
61
+
62
+ # Extract text properly
63
+ if isinstance(urdu_response, str):
64
+ lesson_text = urdu_response.strip()
65
+ else:
66
+ lesson_text = urdu_response.get("generated_text", "").strip()
67
+
68
 
69
  # Create Word document
70
  doc = Document()