Spaces:
Sleeping
Sleeping
Commit
·
29b936b
1
Parent(s):
617c85f
made changes to app.py and requirements.txt
Browse files- app/main.py +9 -0
- requirements.txt +2 -1
app/main.py
CHANGED
@@ -11,6 +11,15 @@ from app.database import save_chat_session, save_medseg_result
|
|
11 |
|
12 |
app = FastAPI(title="Uspark API")
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
# Ensure models are loaded from the 'models' directory within 'Uspark'
|
15 |
import sys
|
16 |
import os
|
|
|
11 |
|
12 |
app = FastAPI(title="Uspark API")
|
13 |
|
14 |
+
import gradio as gr
|
15 |
+
|
16 |
+
def my_model(input_text):
|
17 |
+
return f"Processed: {input_text}"
|
18 |
+
|
19 |
+
iface = gr.Interface(fn=my_model, inputs="text", outputs="text")
|
20 |
+
iface.launch(server_name="0.0.0.0", server_port=7860)
|
21 |
+
|
22 |
+
|
23 |
# Ensure models are loaded from the 'models' directory within 'Uspark'
|
24 |
import sys
|
25 |
import os
|
requirements.txt
CHANGED
@@ -14,4 +14,5 @@ nibabel==5.1.0
|
|
14 |
opencv-python==4.7.0.72
|
15 |
Pillow==9.4.0
|
16 |
matplotlib==3.7.1
|
17 |
-
python-multipart
|
|
|
|
14 |
opencv-python==4.7.0.72
|
15 |
Pillow==9.4.0
|
16 |
matplotlib==3.7.1
|
17 |
+
python-multipart
|
18 |
+
gradio
|