Spaces:
Sleeping
Sleeping
from fastapi import FastAPI | |
import openai | |
openai.api_key = "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" | |
app = FastAPI() | |
def read_root(): | |
input = "Translate this sentence to French. Sentence: I can speak Chinese." | |
output = openai.Completion.create(model="gpt-3.5-turbo", prompt="Translate") | |
return {"Input": input, "Output": output} |