Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -51,6 +51,9 @@ def generate_topics(user_input,num_topics,previous_query):
|
|
51 |
subtopics = json_from_text(response_topics)
|
52 |
return subtopics
|
53 |
|
|
|
|
|
|
|
54 |
app.add_middleware(
|
55 |
CORSMiddleware,
|
56 |
allow_origins=["*"],
|
@@ -59,9 +62,6 @@ app.add_middleware(
|
|
59 |
allow_headers=["*"],
|
60 |
)
|
61 |
|
62 |
-
# Define the app
|
63 |
-
app = FastAPI()
|
64 |
-
|
65 |
# Create a Pydantic model to handle the input data
|
66 |
class TopicInput(BaseModel):
|
67 |
user_input: str
|
|
|
51 |
subtopics = json_from_text(response_topics)
|
52 |
return subtopics
|
53 |
|
54 |
+
# Define the app
|
55 |
+
app = FastAPI()
|
56 |
+
|
57 |
app.add_middleware(
|
58 |
CORSMiddleware,
|
59 |
allow_origins=["*"],
|
|
|
62 |
allow_headers=["*"],
|
63 |
)
|
64 |
|
|
|
|
|
|
|
65 |
# Create a Pydantic model to handle the input data
|
66 |
class TopicInput(BaseModel):
|
67 |
user_input: str
|