Update app.py
Browse files127 unmodified lines12812913013113213313480 unmodified lines215216217218219127 unmodified lines# "Fill in the blank: 'The quick brown fox jumps over the ______ dog.' Best options are:"prompt = f"Complete the missing word in the following sentence. Give 5 single-word options. Sentence: '{pre_mask_text} ____ {post_mask_text}' Options:"try:# Run inference in a separate thread to not block the main event loop# The model's output will be a list of dicts, e.g., [{"generated_text": "Prompt + predicted word"}]80 unmodified linesif __name__ == "__main__":import uvicornuvicorn.run(app, host="0.0.0.0", port=7860, log_level="info")127 unmodified lines12812913013113213380 unmodified lines214215216217127 unmodified lines# "Fill in the blank: 'The quick brown fox jumps over the ______ dog.' Best options are:"prompt = f"Complete the missing word in the following sentence. Give 5 single-word options. Sentence: '{pre_mask_text} ____ {post_mask_text}' Options:"try:# Run inference in a separate thread to not block the main event loop# The model's output will be a list of dicts, e.g., [{"generated_text": "Prompt + predicted word"}]80 unmodified linesif __name__ == "__main__":import uvicornuvicorn.run(app, host="0.0.0.0", port=7860, log_level="info")
app.py+1-3