Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,14 +4,15 @@ import src.Translate as Translate
|
|
| 4 |
from typing import Optional
|
| 5 |
from fastapi_mcp import FastApiMCP
|
| 6 |
|
| 7 |
-
app = FastAPI(
|
|
|
|
| 8 |
MTMODELS = {'enro': 'BlackKakapo/opus-mt-en-ro',
|
| 9 |
'roen': 'BlackKakapo/opus-mt-ro-en',
|
| 10 |
'gemma': 'Gargaz/gemma-2b-romanian-better'}
|
| 11 |
|
| 12 |
-
@app.get("/")
|
| 13 |
-
def index():
|
| 14 |
-
|
| 15 |
|
| 16 |
@app.get("/paraphrase")
|
| 17 |
def paraphrase(text: str, model: str, operation_id="get_paraphrase", description="Paraphrase text"):
|
|
|
|
| 4 |
from typing import Optional
|
| 5 |
from fastapi_mcp import FastApiMCP
|
| 6 |
|
| 7 |
+
app = FastAPI()
|
| 8 |
+
# app = FastAPI(docs_url="/docs")
|
| 9 |
MTMODELS = {'enro': 'BlackKakapo/opus-mt-en-ro',
|
| 10 |
'roen': 'BlackKakapo/opus-mt-ro-en',
|
| 11 |
'gemma': 'Gargaz/gemma-2b-romanian-better'}
|
| 12 |
|
| 13 |
+
# @app.get("/")
|
| 14 |
+
# def index():
|
| 15 |
+
# return {'endpoints': ['/paraphrase', '/translate', '/docs', 'https://tiberiucristianleon-fastapimt.hf.space/redoc'], 'mtmodels': MTMODELS}
|
| 16 |
|
| 17 |
@app.get("/paraphrase")
|
| 18 |
def paraphrase(text: str, model: str, operation_id="get_paraphrase", description="Paraphrase text"):
|