Skip to content

Commit

Permalink
changed to streamlit app
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Liang committed Feb 4, 2024
1 parent 15dc766 commit 2994735
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions app2.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,19 +236,19 @@ def app():

st.info(result["output"])

# if __name__ == "__main__":
# # test() # Local Testing
# app() # Streamlit webapp
if __name__ == "__main__":
# test() # Local Testing
app() # Streamlit webapp

# FastAPI service
api = FastAPI()
# # FastAPI service
# api = FastAPI()

class Query(BaseModelv2):
topic: str
# class Query(BaseModelv2):
# topic: str

@api.post("/")
def service(query: Query):
topic = query.topic
result = do_research(topic)
return result
# @api.post("/")
# def service(query: Query):
# topic = query.topic
# result = do_research(topic)
# return result

0 comments on commit 2994735

Please sign in to comment.