Spaces:
Paused
Paused
File size: 1,125 Bytes
e3ce00c 640c503 e3ce00c 5a51ef4 e3ce00c c5bf91e 5a51ef4 e3ce00c 5a51ef4 e3ce00c 054690b e3ce00c 054690b e3ce00c 054690b 53eb3d4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
import platform
import pathlib
import os
import gradio as gr
import random
import time
from gradio_client import Client
plt = platform.system()
pathlib.WindowsPath = pathlib.PosixPath
#api = os.environ['API']
def chat(message,history):
from gradio_client import Client
client = Client("ysharma/Chat_with_Meta_llama3_8b")
result = client.predict(
message=message,
request=0.95,
param_3=512,
api_name="/chat"
)
return result
description='''
<h1>
<br/>
π AI Chat Bot is available worldwide in over **160 languages**.<br/>
π¬ This space is powered by **Huggingface Hosting**.<br/>
π This space runs **very fast** even on **CPU**.<br/>
<a href="https://www.facebook.com/MohammedAlakras">π Facebook Account. </a><br/>
<a href="https://github.com/mohammedalakhras/">π Github Account. </a><br/>
BY: Mohammed Alakhras βοΈ
</h1>
'''
#gr.ChatInterface(chat, title='Mohammed Alakhras AI Chat Bot π¬', description=description).launch()
gr.Interface(fn=chat, inputs="text",outputs="text", title='Mohammed Alakhras AI Chat Bot π¬', description=description).launch()
|