nroy8 commited on
Commit
37edcf6
·
verified ·
1 Parent(s): b9d3d52

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -25
app.py DELETED
@@ -1,25 +0,0 @@
1
- import gradio as gr
2
- from transformers import AutoModelForCausalLM, AutoTokenizer
3
-
4
- # Load a medical AI model
5
- MODEL_NAME = "TheBloke/medalpaca-7B-GGUF"
6
- tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
7
- model = AutoModelForCausalLM.from_pretrained(MODEL_NAME)
8
-
9
- def diagnose(symptoms):
10
- prompt = f"I have the following symptoms: {symptoms}. What could it be?"
11
- inputs = tokenizer(prompt, return_tensors="pt")
12
- output = model.generate(**inputs, max_length=200)
13
- return tokenizer.decode(output[0])
14
-
15
- # Create a simple web app
16
- interface = gr.Interface(
17
- fn=diagnose,
18
- inputs="text",
19
- outputs="text",
20
- title="AI Symptom Checker",
21
- description="Enter your symptoms, and the AI will suggest possible conditions."
22
- )
23
-
24
- # Launch the app
25
- interface.launch()