Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -128,7 +128,6 @@ async def predict_masked_lm(request: InferenceRequest):
|
|
128 |
# "Fill in the blank: 'The quick brown fox jumps over the ______ dog.' Best options are:"
|
129 |
prompt = f"Complete the missing word in the following sentence. Give 5 single-word options. Sentence: '{pre_mask_text} ____ {post_mask_text}' Options:"
|
130 |
|
131 |
-
|
132 |
try:
|
133 |
# Run inference in a separate thread to not block the main event loop
|
134 |
# The model's output will be a list of dicts, e.g., [{"generated_text": "Prompt + predicted word"}]
|
@@ -215,5 +214,4 @@ async def catch_all(request: Request, path_name: str):
|
|
215 |
|
216 |
if __name__ == "__main__":
|
217 |
import uvicorn
|
218 |
-
uvicorn.run(app, host="0.0.0.0", port=7860, log_level="info")
|
219 |
-
|
|
|
128 |
# "Fill in the blank: 'The quick brown fox jumps over the ______ dog.' Best options are:"
|
129 |
prompt = f"Complete the missing word in the following sentence. Give 5 single-word options. Sentence: '{pre_mask_text} ____ {post_mask_text}' Options:"
|
130 |
|
|
|
131 |
try:
|
132 |
# Run inference in a separate thread to not block the main event loop
|
133 |
# The model's output will be a list of dicts, e.g., [{"generated_text": "Prompt + predicted word"}]
|
|
|
214 |
|
215 |
if __name__ == "__main__":
|
216 |
import uvicorn
|
217 |
+
uvicorn.run(app, host="0.0.0.0", port=7860, log_level="info")
|
|