Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
def chat_with_gpt(input_text):
|
5 |
-
model_name = "
|
6 |
chat_gpt = pipeline("text-generation", model=model_name, device=0)
|
7 |
generated_text = chat_gpt(input_text, max_length=150, do_sample=True, top_k=50, top_p=0.95)
|
8 |
return generated_text[0]["generated_text"]
|
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
def chat_with_gpt(input_text):
|
5 |
+
model_name = "text-davinci-003" # Replace this with the appropriate GPT model you want to use.
|
6 |
chat_gpt = pipeline("text-generation", model=model_name, device=0)
|
7 |
generated_text = chat_gpt(input_text, max_length=150, do_sample=True, top_k=50, top_p=0.95)
|
8 |
return generated_text[0]["generated_text"]
|