Zerx966 commited on
Commit
8abf6d6
·
verified ·
1 Parent(s): e07563d

Create Lordgpt

Browse files
Files changed (1) hide show
  1. Lordgpt +20 -0
Lordgpt ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ def generate_response(prompt):
2
+ response = llm.create_chat_completion(
3
+ messages=[
4
+ {
5
+ "role": "user",
6
+ "content": prompt
7
+ }
8
+ ]
9
+ )
10
+ return response["choices"][0]["message"]["content"]
11
+
12
+ iface = gr.Interface(
13
+ fn=generate_response,
14
+ inputs=gr.inputs.Textbox(lines=2, placeholder="Enter your prompt here..."),
15
+ outputs=gr.outputs.Textbox(),
16
+ title="Llama Model",
17
+ description="A Gradio interface to interact with the Llama model.",
18
+ )
19
+
20
+ iface.launch()