khalednabawi11 commited on
Commit
ae2daab
·
verified ·
1 Parent(s): 80193e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -35,6 +35,10 @@ model = AutoModelForCausalLM.from_pretrained(model_name)
35
  tokenizer.pad_token = tokenizer.eos_token
36
 
37
 
 
 
 
 
38
  # Generation settings
39
  generation_config = GenerationConfig(
40
  max_new_tokens=150,
@@ -75,9 +79,6 @@ qa_chain = RetrievalQA.from_chain_type(
75
  chain_type="stuff"
76
  )
77
 
78
- # FastAPI setup
79
- app = FastAPI(title="Apollo RAG Medical Chatbot")
80
-
81
  class Query(BaseModel):
82
  question: str = Field(..., example="ما هي اسباب تساقط الشعر ؟", min_length=3)
83
 
 
35
  tokenizer.pad_token = tokenizer.eos_token
36
 
37
 
38
+ # FastAPI setup
39
+ app = FastAPI(title="Apollo RAG Medical Chatbot")
40
+
41
+
42
  # Generation settings
43
  generation_config = GenerationConfig(
44
  max_new_tokens=150,
 
79
  chain_type="stuff"
80
  )
81
 
 
 
 
82
  class Query(BaseModel):
83
  question: str = Field(..., example="ما هي اسباب تساقط الشعر ؟", min_length=3)
84