️ DEPRECATED GITLAB INSTANCE ️ This GitLab is now read-only for reference. Please use https://gitlab.iauro.co for all new work.

Migration completed on September 17, 2025

Commit 0ca012dd authored by Pratiksha Patil's avatar Pratiksha Patil

10th Assignment of fastapi streamlit Deployment

parent 309e6111
# Dockerfile for FastAPI
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.9
COPY ./app /app
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
return {"message": "Hello from FastAPI"}
import streamlit as st
import requests
st.title("Streamlit + FastAPI")
if st.button("Call FastAPI"):
response = requests.get("http://localhost:8000")
if response.status_code == 200:
st.success(response.json()["message"])
else:
st.error("Failed to reach FastAPI")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment