Update app.py
Browse files
app.py
CHANGED
@@ -71,8 +71,8 @@ class DocumentRetrievalAndGeneration:
|
|
71 |
return generate_text
|
72 |
def initialize_llm2(self,model_id):
|
73 |
|
74 |
-
tokenizer = BloomTokenizerFast.from_pretrained("bigscience/bloom-
|
75 |
-
model = BloomForCausalLM.from_pretrained("bigscience/bloom-
|
76 |
result_length = 200
|
77 |
inputs = tokenizer(prompt, return_tensors="pt")
|
78 |
# return generate_text
|
@@ -186,9 +186,9 @@ if __name__ == "__main__":
|
|
186 |
font-weight: bold; /* Make text bold */
|
187 |
}
|
188 |
"""
|
189 |
-
EXAMPLES = ["
|
190 |
-
"
|
191 |
-
"
|
192 |
|
193 |
interface = gr.Interface(
|
194 |
fn=doc_retrieval_gen.qa_infer_gradio,
|
|
|
71 |
return generate_text
|
72 |
def initialize_llm2(self,model_id):
|
73 |
|
74 |
+
tokenizer = BloomTokenizerFast.from_pretrained("bigscience/bloom-3b")#, local_files_only=True)
|
75 |
+
model = BloomForCausalLM.from_pretrained("bigscience/bloom-3b")#, local_files_only=True)
|
76 |
result_length = 200
|
77 |
inputs = tokenizer(prompt, return_tensors="pt")
|
78 |
# return generate_text
|
|
|
186 |
font-weight: bold; /* Make text bold */
|
187 |
}
|
188 |
"""
|
189 |
+
EXAMPLES = ["What are the main types of blood cancer, and how do they differ in terms of symptoms, progression, and treatment options? ",
|
190 |
+
"What are the latest advancements in the treatment of blood cancer, and how do they improve patient outcomes compared to traditional therapies?",
|
191 |
+
"How do genetic factors and environmental exposures contribute to the risk of developing blood cancer, and what preventive measures can be taken?"]
|
192 |
|
193 |
interface = gr.Interface(
|
194 |
fn=doc_retrieval_gen.qa_infer_gradio,
|