Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,12 @@
|
|
| 1 |
from fastapi import FastAPI, HTTPException, Request
|
| 2 |
from pydantic import BaseModel
|
| 3 |
import pandas as pd
|
| 4 |
-
import
|
| 5 |
-
import json
|
| 6 |
|
| 7 |
app = FastAPI()
|
| 8 |
|
| 9 |
-
# Load CSV data
|
| 10 |
-
csv_file_path = '
|
| 11 |
data = pd.read_csv(csv_file_path)
|
| 12 |
|
| 13 |
class DialogflowRequest(BaseModel):
|
|
@@ -53,4 +52,5 @@ def get_match_details(query_text):
|
|
| 53 |
|
| 54 |
return response_text
|
| 55 |
|
| 56 |
-
# Run the application with: uvicorn
|
|
|
|
|
|
| 1 |
from fastapi import FastAPI, HTTPException, Request
|
| 2 |
from pydantic import BaseModel
|
| 3 |
import pandas as pd
|
| 4 |
+
import os
|
|
|
|
| 5 |
|
| 6 |
app = FastAPI()
|
| 7 |
|
| 8 |
+
# Load CSV data from the current directory
|
| 9 |
+
csv_file_path = 'matches.csv'
|
| 10 |
data = pd.read_csv(csv_file_path)
|
| 11 |
|
| 12 |
class DialogflowRequest(BaseModel):
|
|
|
|
| 52 |
|
| 53 |
return response_text
|
| 54 |
|
| 55 |
+
# Run the application with: uvicorn app:app --reload
|
| 56 |
+
|