File size: 450 Bytes
4282b14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
069ca00
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr
from openai import OpenAI
import json
import os
def process_input(text, number):
    # You can perform any processing or computation here
    # For simplicity, this example just combines the inputs into a dictionary
    result = {'input_text': text, 'input_number': number}
    return result

iface = gr.Interface(
    fn=process_input,
    inputs=["text", "number"],
    outputs="json"
)

iface.launch(auth=("admin", "pass1234"))