Deepak Perla
commited on
Commit
·
0a8de6b
1
Parent(s):
6e1c6f6
Initial commit
Browse files- .gitignore +0 -0
- MedAI-LLM/Dockerfile +8 -0
- MedAI-LLM/README.md +10 -0
- MedAI-LLM/app.py +13 -0
- MedAI-LLM/requirements.txt +3 -0
.gitignore
ADDED
|
Binary file (102 Bytes). View file
|
|
|
MedAI-LLM/Dockerfile
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.9
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
COPY . /app
|
| 5 |
+
|
| 6 |
+
RUN pip install -r requirements.txt
|
| 7 |
+
|
| 8 |
+
CMD ["python", "app.py"]
|
MedAI-LLM/README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: MedAI LLM
|
| 3 |
+
emoji: 🏆
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: gray
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
MedAI-LLM/app.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from flask import Flask, request, jsonify
|
| 2 |
+
|
| 3 |
+
app = Flask(__name__)
|
| 4 |
+
|
| 5 |
+
@app.route("/predict", methods=["POST"])
|
| 6 |
+
def predict():
|
| 7 |
+
data = request.get_json()
|
| 8 |
+
user_input = data.get("input", "")
|
| 9 |
+
response = f"Generated text for: {user_input}" # Dummy response
|
| 10 |
+
return jsonify({"response": response})
|
| 11 |
+
|
| 12 |
+
if __name__ == "__main__":
|
| 13 |
+
app.run(host="0.0.0.0", port=7860)
|
MedAI-LLM/requirements.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
flask
|
| 2 |
+
torch
|
| 3 |
+
transformers
|